<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - ohos_codeCoverage.info - prebuilts/clang/ohos/linux-x86_64/llvm/include/libcxx-ohos/include/c++/v1/memory</title>
  <link rel="stylesheet" type="text/css" href="../../../../../../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../../../../../../../index.html">top level</a> - <a href="index.html">prebuilts/clang/ohos/linux-x86_64/llvm/include/libcxx-ohos/include/c++/v1</a> - memory<span style="font-size: 80%;"> (source / <a href="memory.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">ohos_codeCoverage.info</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">23</td>
            <td class="headerCovTableEntry">29</td>
            <td class="headerCovTableEntryMed">79.3 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2022-08-23 10:37:51</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">15</td>
            <td class="headerCovTableEntry">18</td>
            <td class="headerCovTableEntryMed">83.3 %</td>
          </tr>
          <tr>
            <td></td>
            <td></td>
            <td></td>
            <td class="headerItem">Branches:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntryHi">-</td>
          </tr>
          <tr><td><img src="../../../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">           Branch data     Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>                :            : // -*- C++ -*-</a>
<a name="2"><span class="lineNum">       2 </span>                :            : //===-------------------------- memory ------------------------------------===//</a>
<a name="3"><span class="lineNum">       3 </span>                :            : //</a>
<a name="4"><span class="lineNum">       4 </span>                :            : // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.</a>
<a name="5"><span class="lineNum">       5 </span>                :            : // See https://llvm.org/LICENSE.txt for license information.</a>
<a name="6"><span class="lineNum">       6 </span>                :            : // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception</a>
<a name="7"><span class="lineNum">       7 </span>                :            : //</a>
<a name="8"><span class="lineNum">       8 </span>                :            : //===----------------------------------------------------------------------===//</a>
<a name="9"><span class="lineNum">       9 </span>                :            : </a>
<a name="10"><span class="lineNum">      10 </span>                :            : #ifndef _LIBCPP_MEMORY</a>
<a name="11"><span class="lineNum">      11 </span>                :            : #define _LIBCPP_MEMORY</a>
<a name="12"><span class="lineNum">      12 </span>                :            : </a>
<a name="13"><span class="lineNum">      13 </span>                :            : /*</a>
<a name="14"><span class="lineNum">      14 </span>                :            :     memory synopsis</a>
<a name="15"><span class="lineNum">      15 </span>                :            : </a>
<a name="16"><span class="lineNum">      16 </span>                :            : namespace std</a>
<a name="17"><span class="lineNum">      17 </span>                :            : {</a>
<a name="18"><span class="lineNum">      18 </span>                :            : </a>
<a name="19"><span class="lineNum">      19 </span>                :            : struct allocator_arg_t { };</a>
<a name="20"><span class="lineNum">      20 </span>                :            : inline constexpr allocator_arg_t allocator_arg = allocator_arg_t();</a>
<a name="21"><span class="lineNum">      21 </span>                :            : </a>
<a name="22"><span class="lineNum">      22 </span>                :            : template &lt;class T, class Alloc&gt; struct uses_allocator;</a>
<a name="23"><span class="lineNum">      23 </span>                :            : </a>
<a name="24"><span class="lineNum">      24 </span>                :            : template &lt;class Ptr&gt;</a>
<a name="25"><span class="lineNum">      25 </span>                :            : struct pointer_traits</a>
<a name="26"><span class="lineNum">      26 </span>                :            : {</a>
<a name="27"><span class="lineNum">      27 </span>                :            :     typedef Ptr pointer;</a>
<a name="28"><span class="lineNum">      28 </span>                :            :     typedef &lt;details&gt; element_type;</a>
<a name="29"><span class="lineNum">      29 </span>                :            :     typedef &lt;details&gt; difference_type;</a>
<a name="30"><span class="lineNum">      30 </span>                :            : </a>
<a name="31"><span class="lineNum">      31 </span>                :            :     template &lt;class U&gt; using rebind = &lt;details&gt;;</a>
<a name="32"><span class="lineNum">      32 </span>                :            : </a>
<a name="33"><span class="lineNum">      33 </span>                :            :     static pointer pointer_to(&lt;details&gt;);</a>
<a name="34"><span class="lineNum">      34 </span>                :            : };</a>
<a name="35"><span class="lineNum">      35 </span>                :            : </a>
<a name="36"><span class="lineNum">      36 </span>                :            : template &lt;class T&gt;</a>
<a name="37"><span class="lineNum">      37 </span>                :            : struct pointer_traits&lt;T*&gt;</a>
<a name="38"><span class="lineNum">      38 </span>                :            : {</a>
<a name="39"><span class="lineNum">      39 </span>                :            :     typedef T* pointer;</a>
<a name="40"><span class="lineNum">      40 </span>                :            :     typedef T element_type;</a>
<a name="41"><span class="lineNum">      41 </span>                :            :     typedef ptrdiff_t difference_type;</a>
<a name="42"><span class="lineNum">      42 </span>                :            : </a>
<a name="43"><span class="lineNum">      43 </span>                :            :     template &lt;class U&gt; using rebind = U*;</a>
<a name="44"><span class="lineNum">      44 </span>                :            : </a>
<a name="45"><span class="lineNum">      45 </span>                :            :     static pointer pointer_to(&lt;details&gt;) noexcept; // constexpr in C++20</a>
<a name="46"><span class="lineNum">      46 </span>                :            : };</a>
<a name="47"><span class="lineNum">      47 </span>                :            : </a>
<a name="48"><span class="lineNum">      48 </span>                :            : template &lt;class T&gt; constexpr T* to_address(T* p) noexcept; // C++20</a>
<a name="49"><span class="lineNum">      49 </span>                :            : template &lt;class Ptr&gt; constexpr auto to_address(const Ptr&amp; p) noexcept; // C++20</a>
<a name="50"><span class="lineNum">      50 </span>                :            : </a>
<a name="51"><span class="lineNum">      51 </span>                :            : template &lt;class Alloc&gt;</a>
<a name="52"><span class="lineNum">      52 </span>                :            : struct allocator_traits</a>
<a name="53"><span class="lineNum">      53 </span>                :            : {</a>
<a name="54"><span class="lineNum">      54 </span>                :            :     typedef Alloc                        allocator_type;</a>
<a name="55"><span class="lineNum">      55 </span>                :            :     typedef typename allocator_type::value_type</a>
<a name="56"><span class="lineNum">      56 </span>                :            :                                          value_type;</a>
<a name="57"><span class="lineNum">      57 </span>                :            : </a>
<a name="58"><span class="lineNum">      58 </span>                :            :     typedef Alloc::pointer | value_type* pointer;</a>
<a name="59"><span class="lineNum">      59 </span>                :            :     typedef Alloc::const_pointer</a>
<a name="60"><span class="lineNum">      60 </span>                :            :           | pointer_traits&lt;pointer&gt;::rebind&lt;const value_type&gt;</a>
<a name="61"><span class="lineNum">      61 </span>                :            :                                          const_pointer;</a>
<a name="62"><span class="lineNum">      62 </span>                :            :     typedef Alloc::void_pointer</a>
<a name="63"><span class="lineNum">      63 </span>                :            :           | pointer_traits&lt;pointer&gt;::rebind&lt;void&gt;</a>
<a name="64"><span class="lineNum">      64 </span>                :            :                                          void_pointer;</a>
<a name="65"><span class="lineNum">      65 </span>                :            :     typedef Alloc::const_void_pointer</a>
<a name="66"><span class="lineNum">      66 </span>                :            :           | pointer_traits&lt;pointer&gt;::rebind&lt;const void&gt;</a>
<a name="67"><span class="lineNum">      67 </span>                :            :                                          const_void_pointer;</a>
<a name="68"><span class="lineNum">      68 </span>                :            :     typedef Alloc::difference_type</a>
<a name="69"><span class="lineNum">      69 </span>                :            :           | pointer_traits&lt;pointer&gt;::difference_type</a>
<a name="70"><span class="lineNum">      70 </span>                :            :                                          difference_type;</a>
<a name="71"><span class="lineNum">      71 </span>                :            :     typedef Alloc::size_type</a>
<a name="72"><span class="lineNum">      72 </span>                :            :           | make_unsigned&lt;difference_type&gt;::type</a>
<a name="73"><span class="lineNum">      73 </span>                :            :                                          size_type;</a>
<a name="74"><span class="lineNum">      74 </span>                :            :     typedef Alloc::propagate_on_container_copy_assignment</a>
<a name="75"><span class="lineNum">      75 </span>                :            :           | false_type                   propagate_on_container_copy_assignment;</a>
<a name="76"><span class="lineNum">      76 </span>                :            :     typedef Alloc::propagate_on_container_move_assignment</a>
<a name="77"><span class="lineNum">      77 </span>                :            :           | false_type                   propagate_on_container_move_assignment;</a>
<a name="78"><span class="lineNum">      78 </span>                :            :     typedef Alloc::propagate_on_container_swap</a>
<a name="79"><span class="lineNum">      79 </span>                :            :           | false_type                   propagate_on_container_swap;</a>
<a name="80"><span class="lineNum">      80 </span>                :            :     typedef Alloc::is_always_equal</a>
<a name="81"><span class="lineNum">      81 </span>                :            :           | is_empty                     is_always_equal;</a>
<a name="82"><span class="lineNum">      82 </span>                :            : </a>
<a name="83"><span class="lineNum">      83 </span>                :            :     template &lt;class T&gt; using rebind_alloc  = Alloc::rebind&lt;T&gt;::other | Alloc&lt;T, Args...&gt;;</a>
<a name="84"><span class="lineNum">      84 </span>                :            :     template &lt;class T&gt; using rebind_traits = allocator_traits&lt;rebind_alloc&lt;T&gt;&gt;;</a>
<a name="85"><span class="lineNum">      85 </span>                :            : </a>
<a name="86"><span class="lineNum">      86 </span>                :            :     static pointer allocate(allocator_type&amp; a, size_type n);                          // constexpr and [[nodiscard]] in C++20</a>
<a name="87"><span class="lineNum">      87 </span>                :            :     static pointer allocate(allocator_type&amp; a, size_type n, const_void_pointer hint); // constexpr and [[nodiscard]] in C++20</a>
<a name="88"><span class="lineNum">      88 </span>                :            : </a>
<a name="89"><span class="lineNum">      89 </span>                :            :     static void deallocate(allocator_type&amp; a, pointer p, size_type n) noexcept; // constexpr in C++20</a>
<a name="90"><span class="lineNum">      90 </span>                :            : </a>
<a name="91"><span class="lineNum">      91 </span>                :            :     template &lt;class T, class... Args&gt;</a>
<a name="92"><span class="lineNum">      92 </span>                :            :     static void construct(allocator_type&amp; a, T* p, Args&amp;&amp;... args); // constexpr in C++20</a>
<a name="93"><span class="lineNum">      93 </span>                :            : </a>
<a name="94"><span class="lineNum">      94 </span>                :            :     template &lt;class T&gt;</a>
<a name="95"><span class="lineNum">      95 </span>                :            :     static void destroy(allocator_type&amp; a, T* p); // constexpr in C++20</a>
<a name="96"><span class="lineNum">      96 </span>                :            : </a>
<a name="97"><span class="lineNum">      97 </span>                :            :     static size_type max_size(const allocator_type&amp; a); // noexcept in C++14, constexpr in C++20</a>
<a name="98"><span class="lineNum">      98 </span>                :            :     static allocator_type select_on_container_copy_construction(const allocator_type&amp; a); // constexpr in C++20</a>
<a name="99"><span class="lineNum">      99 </span>                :            : };</a>
<a name="100"><span class="lineNum">     100 </span>                :            : </a>
<a name="101"><span class="lineNum">     101 </span>                :            : template &lt;&gt;</a>
<a name="102"><span class="lineNum">     102 </span>                :            : class allocator&lt;void&gt; // removed in C++20</a>
<a name="103"><span class="lineNum">     103 </span>                :            : {</a>
<a name="104"><span class="lineNum">     104 </span>                :            : public:</a>
<a name="105"><span class="lineNum">     105 </span>                :            :     typedef void*                                 pointer;          // deprecated in C++17</a>
<a name="106"><span class="lineNum">     106 </span>                :            :     typedef const void*                           const_pointer;    // deprecated in C++17</a>
<a name="107"><span class="lineNum">     107 </span>                :            :     typedef void                                  value_type;       // deprecated in C++17</a>
<a name="108"><span class="lineNum">     108 </span>                :            : </a>
<a name="109"><span class="lineNum">     109 </span>                :            :     template &lt;class _Up&gt; struct rebind {typedef allocator&lt;_Up&gt; other;}; // deprecated in C++17</a>
<a name="110"><span class="lineNum">     110 </span>                :            : };</a>
<a name="111"><span class="lineNum">     111 </span>                :            : </a>
<a name="112"><span class="lineNum">     112 </span>                :            : template &lt;class T&gt;</a>
<a name="113"><span class="lineNum">     113 </span>                :            : class allocator</a>
<a name="114"><span class="lineNum">     114 </span>                :            : {</a>
<a name="115"><span class="lineNum">     115 </span>                :            : public:</a>
<a name="116"><span class="lineNum">     116 </span>                :            :     typedef size_t    size_type;</a>
<a name="117"><span class="lineNum">     117 </span>                :            :     typedef ptrdiff_t difference_type;</a>
<a name="118"><span class="lineNum">     118 </span>                :            :     typedef T*        pointer;                           // deprecated in C++17, removed in C++20</a>
<a name="119"><span class="lineNum">     119 </span>                :            :     typedef const T*  const_pointer;                     // deprecated in C++17, removed in C++20</a>
<a name="120"><span class="lineNum">     120 </span>                :            :     typedef typename add_lvalue_reference&lt;T&gt;::type</a>
<a name="121"><span class="lineNum">     121 </span>                :            :                       reference;                         // deprecated in C++17, removed in C++20</a>
<a name="122"><span class="lineNum">     122 </span>                :            :     typedef typename add_lvalue_reference&lt;const T&gt;::type</a>
<a name="123"><span class="lineNum">     123 </span>                :            :                       const_reference;                   // deprecated in C++17, removed in C++20</a>
<a name="124"><span class="lineNum">     124 </span>                :            : </a>
<a name="125"><span class="lineNum">     125 </span>                :            :     typedef T         value_type;</a>
<a name="126"><span class="lineNum">     126 </span>                :            : </a>
<a name="127"><span class="lineNum">     127 </span>                :            :     template &lt;class U&gt; struct rebind {typedef allocator&lt;U&gt; other;}; // deprecated in C++17, removed in C++20</a>
<a name="128"><span class="lineNum">     128 </span>                :            : </a>
<a name="129"><span class="lineNum">     129 </span>                :            :     typedef true_type propagate_on_container_move_assignment;</a>
<a name="130"><span class="lineNum">     130 </span>                :            :     typedef true_type is_always_equal;</a>
<a name="131"><span class="lineNum">     131 </span>                :            : </a>
<a name="132"><span class="lineNum">     132 </span>                :            :     constexpr allocator() noexcept;                      // constexpr in C++20</a>
<a name="133"><span class="lineNum">     133 </span>                :            :     constexpr allocator(const allocator&amp;) noexcept;      // constexpr in C++20</a>
<a name="134"><span class="lineNum">     134 </span>                :            :     template &lt;class U&gt;</a>
<a name="135"><span class="lineNum">     135 </span>                :            :       constexpr allocator(const allocator&lt;U&gt;&amp;) noexcept; // constexpr in C++20</a>
<a name="136"><span class="lineNum">     136 </span>                :            :     ~allocator();                                        // constexpr in C++20</a>
<a name="137"><span class="lineNum">     137 </span>                :            :     pointer address(reference x) const noexcept;             // deprecated in C++17, removed in C++20</a>
<a name="138"><span class="lineNum">     138 </span>                :            :     const_pointer address(const_reference x) const noexcept; // deprecated in C++17, removed in C++20</a>
<a name="139"><span class="lineNum">     139 </span>                :            :     T* allocate(size_t n, const void* hint);          // deprecated in C++17, removed in C++20</a>
<a name="140"><span class="lineNum">     140 </span>                :            :     T* allocate(size_t n);                              // constexpr in C++20</a>
<a name="141"><span class="lineNum">     141 </span>                :            :     void deallocate(T* p, size_t n) noexcept;           // constexpr in C++20</a>
<a name="142"><span class="lineNum">     142 </span>                :            :     size_type max_size() const noexcept;              // deprecated in C++17, removed in C++20</a>
<a name="143"><span class="lineNum">     143 </span>                :            :     template&lt;class U, class... Args&gt;</a>
<a name="144"><span class="lineNum">     144 </span>                :            :         void construct(U* p, Args&amp;&amp;... args);         // deprecated in C++17, removed in C++20</a>
<a name="145"><span class="lineNum">     145 </span>                :            :     template &lt;class U&gt;</a>
<a name="146"><span class="lineNum">     146 </span>                :            :         void destroy(U* p);                           // deprecated in C++17, removed in C++20</a>
<a name="147"><span class="lineNum">     147 </span>                :            : };</a>
<a name="148"><span class="lineNum">     148 </span>                :            : </a>
<a name="149"><span class="lineNum">     149 </span>                :            : template &lt;class T, class U&gt;</a>
<a name="150"><span class="lineNum">     150 </span>                :            : bool operator==(const allocator&lt;T&gt;&amp;, const allocator&lt;U&gt;&amp;) noexcept; // constexpr in C++20</a>
<a name="151"><span class="lineNum">     151 </span>                :            : </a>
<a name="152"><span class="lineNum">     152 </span>                :            : template &lt;class T, class U&gt;</a>
<a name="153"><span class="lineNum">     153 </span>                :            : bool operator!=(const allocator&lt;T&gt;&amp;, const allocator&lt;U&gt;&amp;) noexcept; // constexpr in C++20</a>
<a name="154"><span class="lineNum">     154 </span>                :            : </a>
<a name="155"><span class="lineNum">     155 </span>                :            : template &lt;class OutputIterator, class T&gt;</a>
<a name="156"><span class="lineNum">     156 </span>                :            : class raw_storage_iterator</a>
<a name="157"><span class="lineNum">     157 </span>                :            :     : public iterator&lt;output_iterator_tag,</a>
<a name="158"><span class="lineNum">     158 </span>                :            :                       T,                               // purposefully not C++03</a>
<a name="159"><span class="lineNum">     159 </span>                :            :                       ptrdiff_t,                       // purposefully not C++03</a>
<a name="160"><span class="lineNum">     160 </span>                :            :                       T*,                              // purposefully not C++03</a>
<a name="161"><span class="lineNum">     161 </span>                :            :                       raw_storage_iterator&amp;&gt;           // purposefully not C++03</a>
<a name="162"><span class="lineNum">     162 </span>                :            : {</a>
<a name="163"><span class="lineNum">     163 </span>                :            : public:</a>
<a name="164"><span class="lineNum">     164 </span>                :            :     explicit raw_storage_iterator(OutputIterator x);</a>
<a name="165"><span class="lineNum">     165 </span>                :            :     raw_storage_iterator&amp; operator*();</a>
<a name="166"><span class="lineNum">     166 </span>                :            :     raw_storage_iterator&amp; operator=(const T&amp; element);</a>
<a name="167"><span class="lineNum">     167 </span>                :            :     raw_storage_iterator&amp; operator++();</a>
<a name="168"><span class="lineNum">     168 </span>                :            :     raw_storage_iterator  operator++(int);</a>
<a name="169"><span class="lineNum">     169 </span>                :            : };</a>
<a name="170"><span class="lineNum">     170 </span>                :            : </a>
<a name="171"><span class="lineNum">     171 </span>                :            : template &lt;class T&gt; pair&lt;T*,ptrdiff_t&gt; get_temporary_buffer(ptrdiff_t n) noexcept;</a>
<a name="172"><span class="lineNum">     172 </span>                :            : template &lt;class T&gt; void               return_temporary_buffer(T* p) noexcept;</a>
<a name="173"><span class="lineNum">     173 </span>                :            : </a>
<a name="174"><span class="lineNum">     174 </span>                :            : template &lt;class T&gt; T* addressof(T&amp; r) noexcept;</a>
<a name="175"><span class="lineNum">     175 </span>                :            : template &lt;class T&gt; T* addressof(const T&amp;&amp; r) noexcept = delete;</a>
<a name="176"><span class="lineNum">     176 </span>                :            : </a>
<a name="177"><span class="lineNum">     177 </span>                :            : template &lt;class InputIterator, class ForwardIterator&gt;</a>
<a name="178"><span class="lineNum">     178 </span>                :            : ForwardIterator</a>
<a name="179"><span class="lineNum">     179 </span>                :            : uninitialized_copy(InputIterator first, InputIterator last, ForwardIterator result);</a>
<a name="180"><span class="lineNum">     180 </span>                :            : </a>
<a name="181"><span class="lineNum">     181 </span>                :            : template &lt;class InputIterator, class Size, class ForwardIterator&gt;</a>
<a name="182"><span class="lineNum">     182 </span>                :            : ForwardIterator</a>
<a name="183"><span class="lineNum">     183 </span>                :            : uninitialized_copy_n(InputIterator first, Size n, ForwardIterator result);</a>
<a name="184"><span class="lineNum">     184 </span>                :            : </a>
<a name="185"><span class="lineNum">     185 </span>                :            : template &lt;class ForwardIterator, class T&gt;</a>
<a name="186"><span class="lineNum">     186 </span>                :            : void uninitialized_fill(ForwardIterator first, ForwardIterator last, const T&amp; x);</a>
<a name="187"><span class="lineNum">     187 </span>                :            : </a>
<a name="188"><span class="lineNum">     188 </span>                :            : template &lt;class ForwardIterator, class Size, class T&gt;</a>
<a name="189"><span class="lineNum">     189 </span>                :            : ForwardIterator</a>
<a name="190"><span class="lineNum">     190 </span>                :            : uninitialized_fill_n(ForwardIterator first, Size n, const T&amp; x);</a>
<a name="191"><span class="lineNum">     191 </span>                :            : </a>
<a name="192"><span class="lineNum">     192 </span>                :            : template &lt;class T, class ...Args&gt;</a>
<a name="193"><span class="lineNum">     193 </span>                :            : constexpr T* construct_at(T* location, Args&amp;&amp; ...args); // since C++20</a>
<a name="194"><span class="lineNum">     194 </span>                :            : </a>
<a name="195"><span class="lineNum">     195 </span>                :            : template &lt;class T&gt;</a>
<a name="196"><span class="lineNum">     196 </span>                :            : void destroy_at(T* location); // constexpr in C++20</a>
<a name="197"><span class="lineNum">     197 </span>                :            : </a>
<a name="198"><span class="lineNum">     198 </span>                :            : template &lt;class ForwardIterator&gt;</a>
<a name="199"><span class="lineNum">     199 </span>                :            : void destroy(ForwardIterator first, ForwardIterator last); // constexpr in C++20</a>
<a name="200"><span class="lineNum">     200 </span>                :            : </a>
<a name="201"><span class="lineNum">     201 </span>                :            : template &lt;class ForwardIterator, class Size&gt;</a>
<a name="202"><span class="lineNum">     202 </span>                :            : ForwardIterator destroy_n(ForwardIterator first, Size n); // constexpr in C++20</a>
<a name="203"><span class="lineNum">     203 </span>                :            : </a>
<a name="204"><span class="lineNum">     204 </span>                :            : template &lt;class InputIterator, class ForwardIterator&gt;</a>
<a name="205"><span class="lineNum">     205 </span>                :            :  ForwardIterator uninitialized_move(InputIterator first, InputIterator last, ForwardIterator result);</a>
<a name="206"><span class="lineNum">     206 </span>                :            : </a>
<a name="207"><span class="lineNum">     207 </span>                :            : template &lt;class InputIterator, class Size, class ForwardIterator&gt;</a>
<a name="208"><span class="lineNum">     208 </span>                :            :  pair&lt;InputIterator,ForwardIterator&gt; uninitialized_move_n(InputIterator first, Size n, ForwardIterator result);</a>
<a name="209"><span class="lineNum">     209 </span>                :            : </a>
<a name="210"><span class="lineNum">     210 </span>                :            : template &lt;class ForwardIterator&gt;</a>
<a name="211"><span class="lineNum">     211 </span>                :            :  void uninitialized_value_construct(ForwardIterator first, ForwardIterator last);</a>
<a name="212"><span class="lineNum">     212 </span>                :            : </a>
<a name="213"><span class="lineNum">     213 </span>                :            : template &lt;class ForwardIterator, class Size&gt;</a>
<a name="214"><span class="lineNum">     214 </span>                :            :  ForwardIterator uninitialized_value_construct_n(ForwardIterator first, Size n);</a>
<a name="215"><span class="lineNum">     215 </span>                :            : </a>
<a name="216"><span class="lineNum">     216 </span>                :            : template &lt;class ForwardIterator&gt;</a>
<a name="217"><span class="lineNum">     217 </span>                :            :  void uninitialized_default_construct(ForwardIterator first, ForwardIterator last);</a>
<a name="218"><span class="lineNum">     218 </span>                :            : </a>
<a name="219"><span class="lineNum">     219 </span>                :            : template &lt;class ForwardIterator, class Size&gt;</a>
<a name="220"><span class="lineNum">     220 </span>                :            :  ForwardIterator uninitialized_default_construct_n(ForwardIterator first, Size n);</a>
<a name="221"><span class="lineNum">     221 </span>                :            : </a>
<a name="222"><span class="lineNum">     222 </span>                :            : template &lt;class Y&gt; struct auto_ptr_ref {};      // deprecated in C++11, removed in C++17</a>
<a name="223"><span class="lineNum">     223 </span>                :            : </a>
<a name="224"><span class="lineNum">     224 </span>                :            : template&lt;class X&gt;</a>
<a name="225"><span class="lineNum">     225 </span>                :            : class auto_ptr                                  // deprecated in C++11, removed in C++17</a>
<a name="226"><span class="lineNum">     226 </span>                :            : {</a>
<a name="227"><span class="lineNum">     227 </span>                :            : public:</a>
<a name="228"><span class="lineNum">     228 </span>                :            :     typedef X element_type;</a>
<a name="229"><span class="lineNum">     229 </span>                :            : </a>
<a name="230"><span class="lineNum">     230 </span>                :            :     explicit auto_ptr(X* p =0) throw();</a>
<a name="231"><span class="lineNum">     231 </span>                :            :     auto_ptr(auto_ptr&amp;) throw();</a>
<a name="232"><span class="lineNum">     232 </span>                :            :     template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt;&amp;) throw();</a>
<a name="233"><span class="lineNum">     233 </span>                :            :     auto_ptr&amp; operator=(auto_ptr&amp;) throw();</a>
<a name="234"><span class="lineNum">     234 </span>                :            :     template&lt;class Y&gt; auto_ptr&amp; operator=(auto_ptr&lt;Y&gt;&amp;) throw();</a>
<a name="235"><span class="lineNum">     235 </span>                :            :     auto_ptr&amp; operator=(auto_ptr_ref&lt;X&gt; r) throw();</a>
<a name="236"><span class="lineNum">     236 </span>                :            :     ~auto_ptr() throw();</a>
<a name="237"><span class="lineNum">     237 </span>                :            : </a>
<a name="238"><span class="lineNum">     238 </span>                :            :     typename add_lvalue_reference&lt;X&gt;::type operator*() const throw();</a>
<a name="239"><span class="lineNum">     239 </span>                :            :     X* operator-&gt;() const throw();</a>
<a name="240"><span class="lineNum">     240 </span>                :            :     X* get() const throw();</a>
<a name="241"><span class="lineNum">     241 </span>                :            :     X* release() throw();</a>
<a name="242"><span class="lineNum">     242 </span>                :            :     void reset(X* p =0) throw();</a>
<a name="243"><span class="lineNum">     243 </span>                :            : </a>
<a name="244"><span class="lineNum">     244 </span>                :            :     auto_ptr(auto_ptr_ref&lt;X&gt;) throw();</a>
<a name="245"><span class="lineNum">     245 </span>                :            :     template&lt;class Y&gt; operator auto_ptr_ref&lt;Y&gt;() throw();</a>
<a name="246"><span class="lineNum">     246 </span>                :            :     template&lt;class Y&gt; operator auto_ptr&lt;Y&gt;() throw();</a>
<a name="247"><span class="lineNum">     247 </span>                :            : };</a>
<a name="248"><span class="lineNum">     248 </span>                :            : </a>
<a name="249"><span class="lineNum">     249 </span>                :            : template &lt;class T&gt;</a>
<a name="250"><span class="lineNum">     250 </span>                :            : struct default_delete</a>
<a name="251"><span class="lineNum">     251 </span>                :            : {</a>
<a name="252"><span class="lineNum">     252 </span>                :            :     constexpr default_delete() noexcept = default;</a>
<a name="253"><span class="lineNum">     253 </span>                :            :     template &lt;class U&gt; default_delete(const default_delete&lt;U&gt;&amp;) noexcept;</a>
<a name="254"><span class="lineNum">     254 </span>                :            : </a>
<a name="255"><span class="lineNum">     255 </span>                :            :     void operator()(T*) const noexcept;</a>
<a name="256"><span class="lineNum">     256 </span>                :            : };</a>
<a name="257"><span class="lineNum">     257 </span>                :            : </a>
<a name="258"><span class="lineNum">     258 </span>                :            : template &lt;class T&gt;</a>
<a name="259"><span class="lineNum">     259 </span>                :            : struct default_delete&lt;T[]&gt;</a>
<a name="260"><span class="lineNum">     260 </span>                :            : {</a>
<a name="261"><span class="lineNum">     261 </span>                :            :     constexpr default_delete() noexcept = default;</a>
<a name="262"><span class="lineNum">     262 </span>                :            :     void operator()(T*) const noexcept;</a>
<a name="263"><span class="lineNum">     263 </span>                :            :     template &lt;class U&gt; void operator()(U*) const = delete;</a>
<a name="264"><span class="lineNum">     264 </span>                :            : };</a>
<a name="265"><span class="lineNum">     265 </span>                :            : </a>
<a name="266"><span class="lineNum">     266 </span>                :            : template &lt;class T, class D = default_delete&lt;T&gt;&gt;</a>
<a name="267"><span class="lineNum">     267 </span>                :            : class unique_ptr</a>
<a name="268"><span class="lineNum">     268 </span>                :            : {</a>
<a name="269"><span class="lineNum">     269 </span>                :            : public:</a>
<a name="270"><span class="lineNum">     270 </span>                :            :     typedef see below pointer;</a>
<a name="271"><span class="lineNum">     271 </span>                :            :     typedef T element_type;</a>
<a name="272"><span class="lineNum">     272 </span>                :            :     typedef D deleter_type;</a>
<a name="273"><span class="lineNum">     273 </span>                :            : </a>
<a name="274"><span class="lineNum">     274 </span>                :            :     // constructors</a>
<a name="275"><span class="lineNum">     275 </span>                :            :     constexpr unique_ptr() noexcept;</a>
<a name="276"><span class="lineNum">     276 </span>                :            :     explicit unique_ptr(pointer p) noexcept;</a>
<a name="277"><span class="lineNum">     277 </span>                :            :     unique_ptr(pointer p, see below d1) noexcept;</a>
<a name="278"><span class="lineNum">     278 </span>                :            :     unique_ptr(pointer p, see below d2) noexcept;</a>
<a name="279"><span class="lineNum">     279 </span>                :            :     unique_ptr(unique_ptr&amp;&amp; u) noexcept;</a>
<a name="280"><span class="lineNum">     280 </span>                :            :     unique_ptr(nullptr_t) noexcept : unique_ptr() { }</a>
<a name="281"><span class="lineNum">     281 </span>                :            :     template &lt;class U, class E&gt;</a>
<a name="282"><span class="lineNum">     282 </span>                :            :         unique_ptr(unique_ptr&lt;U, E&gt;&amp;&amp; u) noexcept;</a>
<a name="283"><span class="lineNum">     283 </span>                :            :     template &lt;class U&gt;</a>
<a name="284"><span class="lineNum">     284 </span>                :            :         unique_ptr(auto_ptr&lt;U&gt;&amp;&amp; u) noexcept;       // removed in C++17</a>
<a name="285"><span class="lineNum">     285 </span>                :            : </a>
<a name="286"><span class="lineNum">     286 </span>                :            :     // destructor</a>
<a name="287"><span class="lineNum">     287 </span>                :            :     ~unique_ptr();</a>
<a name="288"><span class="lineNum">     288 </span>                :            : </a>
<a name="289"><span class="lineNum">     289 </span>                :            :     // assignment</a>
<a name="290"><span class="lineNum">     290 </span>                :            :     unique_ptr&amp; operator=(unique_ptr&amp;&amp; u) noexcept;</a>
<a name="291"><span class="lineNum">     291 </span>                :            :     template &lt;class U, class E&gt; unique_ptr&amp; operator=(unique_ptr&lt;U, E&gt;&amp;&amp; u) noexcept;</a>
<a name="292"><span class="lineNum">     292 </span>                :            :     unique_ptr&amp; operator=(nullptr_t) noexcept;</a>
<a name="293"><span class="lineNum">     293 </span>                :            : </a>
<a name="294"><span class="lineNum">     294 </span>                :            :     // observers</a>
<a name="295"><span class="lineNum">     295 </span>                :            :     typename add_lvalue_reference&lt;T&gt;::type operator*() const;</a>
<a name="296"><span class="lineNum">     296 </span>                :            :     pointer operator-&gt;() const noexcept;</a>
<a name="297"><span class="lineNum">     297 </span>                :            :     pointer get() const noexcept;</a>
<a name="298"><span class="lineNum">     298 </span>                :            :     deleter_type&amp; get_deleter() noexcept;</a>
<a name="299"><span class="lineNum">     299 </span>                :            :     const deleter_type&amp; get_deleter() const noexcept;</a>
<a name="300"><span class="lineNum">     300 </span>                :            :     explicit operator bool() const noexcept;</a>
<a name="301"><span class="lineNum">     301 </span>                :            : </a>
<a name="302"><span class="lineNum">     302 </span>                :            :     // modifiers</a>
<a name="303"><span class="lineNum">     303 </span>                :            :     pointer release() noexcept;</a>
<a name="304"><span class="lineNum">     304 </span>                :            :     void reset(pointer p = pointer()) noexcept;</a>
<a name="305"><span class="lineNum">     305 </span>                :            :     void swap(unique_ptr&amp; u) noexcept;</a>
<a name="306"><span class="lineNum">     306 </span>                :            : };</a>
<a name="307"><span class="lineNum">     307 </span>                :            : </a>
<a name="308"><span class="lineNum">     308 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="309"><span class="lineNum">     309 </span>                :            : class unique_ptr&lt;T[], D&gt;</a>
<a name="310"><span class="lineNum">     310 </span>                :            : {</a>
<a name="311"><span class="lineNum">     311 </span>                :            : public:</a>
<a name="312"><span class="lineNum">     312 </span>                :            :     typedef implementation-defined pointer;</a>
<a name="313"><span class="lineNum">     313 </span>                :            :     typedef T element_type;</a>
<a name="314"><span class="lineNum">     314 </span>                :            :     typedef D deleter_type;</a>
<a name="315"><span class="lineNum">     315 </span>                :            : </a>
<a name="316"><span class="lineNum">     316 </span>                :            :     // constructors</a>
<a name="317"><span class="lineNum">     317 </span>                :            :     constexpr unique_ptr() noexcept;</a>
<a name="318"><span class="lineNum">     318 </span>                :            :     explicit unique_ptr(pointer p) noexcept;</a>
<a name="319"><span class="lineNum">     319 </span>                :            :     unique_ptr(pointer p, see below d) noexcept;</a>
<a name="320"><span class="lineNum">     320 </span>                :            :     unique_ptr(pointer p, see below d) noexcept;</a>
<a name="321"><span class="lineNum">     321 </span>                :            :     unique_ptr(unique_ptr&amp;&amp; u) noexcept;</a>
<a name="322"><span class="lineNum">     322 </span>                :            :     unique_ptr(nullptr_t) noexcept : unique_ptr() { }</a>
<a name="323"><span class="lineNum">     323 </span>                :            : </a>
<a name="324"><span class="lineNum">     324 </span>                :            :     // destructor</a>
<a name="325"><span class="lineNum">     325 </span>                :            :     ~unique_ptr();</a>
<a name="326"><span class="lineNum">     326 </span>                :            : </a>
<a name="327"><span class="lineNum">     327 </span>                :            :     // assignment</a>
<a name="328"><span class="lineNum">     328 </span>                :            :     unique_ptr&amp; operator=(unique_ptr&amp;&amp; u) noexcept;</a>
<a name="329"><span class="lineNum">     329 </span>                :            :     unique_ptr&amp; operator=(nullptr_t) noexcept;</a>
<a name="330"><span class="lineNum">     330 </span>                :            : </a>
<a name="331"><span class="lineNum">     331 </span>                :            :     // observers</a>
<a name="332"><span class="lineNum">     332 </span>                :            :     T&amp; operator[](size_t i) const;</a>
<a name="333"><span class="lineNum">     333 </span>                :            :     pointer get() const noexcept;</a>
<a name="334"><span class="lineNum">     334 </span>                :            :     deleter_type&amp; get_deleter() noexcept;</a>
<a name="335"><span class="lineNum">     335 </span>                :            :     const deleter_type&amp; get_deleter() const noexcept;</a>
<a name="336"><span class="lineNum">     336 </span>                :            :     explicit operator bool() const noexcept;</a>
<a name="337"><span class="lineNum">     337 </span>                :            : </a>
<a name="338"><span class="lineNum">     338 </span>                :            :     // modifiers</a>
<a name="339"><span class="lineNum">     339 </span>                :            :     pointer release() noexcept;</a>
<a name="340"><span class="lineNum">     340 </span>                :            :     void reset(pointer p = pointer()) noexcept;</a>
<a name="341"><span class="lineNum">     341 </span>                :            :     void reset(nullptr_t) noexcept;</a>
<a name="342"><span class="lineNum">     342 </span>                :            :   template &lt;class U&gt; void reset(U) = delete;</a>
<a name="343"><span class="lineNum">     343 </span>                :            :     void swap(unique_ptr&amp; u) noexcept;</a>
<a name="344"><span class="lineNum">     344 </span>                :            : };</a>
<a name="345"><span class="lineNum">     345 </span>                :            : </a>
<a name="346"><span class="lineNum">     346 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="347"><span class="lineNum">     347 </span>                :            :     void swap(unique_ptr&lt;T, D&gt;&amp; x, unique_ptr&lt;T, D&gt;&amp; y) noexcept;</a>
<a name="348"><span class="lineNum">     348 </span>                :            : </a>
<a name="349"><span class="lineNum">     349 </span>                :            : template &lt;class T1, class D1, class T2, class D2&gt;</a>
<a name="350"><span class="lineNum">     350 </span>                :            :     bool operator==(const unique_ptr&lt;T1, D1&gt;&amp; x, const unique_ptr&lt;T2, D2&gt;&amp; y);</a>
<a name="351"><span class="lineNum">     351 </span>                :            : template &lt;class T1, class D1, class T2, class D2&gt;</a>
<a name="352"><span class="lineNum">     352 </span>                :            :     bool operator!=(const unique_ptr&lt;T1, D1&gt;&amp; x, const unique_ptr&lt;T2, D2&gt;&amp; y);</a>
<a name="353"><span class="lineNum">     353 </span>                :            : template &lt;class T1, class D1, class T2, class D2&gt;</a>
<a name="354"><span class="lineNum">     354 </span>                :            :     bool operator&lt;(const unique_ptr&lt;T1, D1&gt;&amp; x, const unique_ptr&lt;T2, D2&gt;&amp; y);</a>
<a name="355"><span class="lineNum">     355 </span>                :            : template &lt;class T1, class D1, class T2, class D2&gt;</a>
<a name="356"><span class="lineNum">     356 </span>                :            :     bool operator&lt;=(const unique_ptr&lt;T1, D1&gt;&amp; x, const unique_ptr&lt;T2, D2&gt;&amp; y);</a>
<a name="357"><span class="lineNum">     357 </span>                :            : template &lt;class T1, class D1, class T2, class D2&gt;</a>
<a name="358"><span class="lineNum">     358 </span>                :            :     bool operator&gt;(const unique_ptr&lt;T1, D1&gt;&amp; x, const unique_ptr&lt;T2, D2&gt;&amp; y);</a>
<a name="359"><span class="lineNum">     359 </span>                :            : template &lt;class T1, class D1, class T2, class D2&gt;</a>
<a name="360"><span class="lineNum">     360 </span>                :            :     bool operator&gt;=(const unique_ptr&lt;T1, D1&gt;&amp; x, const unique_ptr&lt;T2, D2&gt;&amp; y);</a>
<a name="361"><span class="lineNum">     361 </span>                :            : </a>
<a name="362"><span class="lineNum">     362 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="363"><span class="lineNum">     363 </span>                :            :     bool operator==(const unique_ptr&lt;T, D&gt;&amp; x, nullptr_t) noexcept;</a>
<a name="364"><span class="lineNum">     364 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="365"><span class="lineNum">     365 </span>                :            :     bool operator==(nullptr_t, const unique_ptr&lt;T, D&gt;&amp; y) noexcept;</a>
<a name="366"><span class="lineNum">     366 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="367"><span class="lineNum">     367 </span>                :            :     bool operator!=(const unique_ptr&lt;T, D&gt;&amp; x, nullptr_t) noexcept;</a>
<a name="368"><span class="lineNum">     368 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="369"><span class="lineNum">     369 </span>                :            :     bool operator!=(nullptr_t, const unique_ptr&lt;T, D&gt;&amp; y) noexcept;</a>
<a name="370"><span class="lineNum">     370 </span>                :            : </a>
<a name="371"><span class="lineNum">     371 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="372"><span class="lineNum">     372 </span>                :            :     bool operator&lt;(const unique_ptr&lt;T, D&gt;&amp; x, nullptr_t);</a>
<a name="373"><span class="lineNum">     373 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="374"><span class="lineNum">     374 </span>                :            :     bool operator&lt;(nullptr_t, const unique_ptr&lt;T, D&gt;&amp; y);</a>
<a name="375"><span class="lineNum">     375 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="376"><span class="lineNum">     376 </span>                :            :     bool operator&lt;=(const unique_ptr&lt;T, D&gt;&amp; x, nullptr_t);</a>
<a name="377"><span class="lineNum">     377 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="378"><span class="lineNum">     378 </span>                :            :     bool operator&lt;=(nullptr_t, const unique_ptr&lt;T, D&gt;&amp; y);</a>
<a name="379"><span class="lineNum">     379 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="380"><span class="lineNum">     380 </span>                :            :     bool operator&gt;(const unique_ptr&lt;T, D&gt;&amp; x, nullptr_t);</a>
<a name="381"><span class="lineNum">     381 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="382"><span class="lineNum">     382 </span>                :            :     bool operator&gt;(nullptr_t, const unique_ptr&lt;T, D&gt;&amp; y);</a>
<a name="383"><span class="lineNum">     383 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="384"><span class="lineNum">     384 </span>                :            :     bool operator&gt;=(const unique_ptr&lt;T, D&gt;&amp; x, nullptr_t);</a>
<a name="385"><span class="lineNum">     385 </span>                :            : template &lt;class T, class D&gt;</a>
<a name="386"><span class="lineNum">     386 </span>                :            :     bool operator&gt;=(nullptr_t, const unique_ptr&lt;T, D&gt;&amp; y);</a>
<a name="387"><span class="lineNum">     387 </span>                :            : </a>
<a name="388"><span class="lineNum">     388 </span>                :            : class bad_weak_ptr</a>
<a name="389"><span class="lineNum">     389 </span>                :            :     : public std::exception</a>
<a name="390"><span class="lineNum">     390 </span>                :            : {</a>
<a name="391"><span class="lineNum">     391 </span>                :            :     bad_weak_ptr() noexcept;</a>
<a name="392"><span class="lineNum">     392 </span>                :            : };</a>
<a name="393"><span class="lineNum">     393 </span>                :            : </a>
<a name="394"><span class="lineNum">     394 </span>                :            : template&lt;class T, class... Args&gt; unique_ptr&lt;T&gt; make_unique(Args&amp;&amp;... args);     // C++14</a>
<a name="395"><span class="lineNum">     395 </span>                :            : template&lt;class T&gt;                unique_ptr&lt;T&gt; make_unique(size_t n);           // C++14</a>
<a name="396"><span class="lineNum">     396 </span>                :            : template&lt;class T, class... Args&gt; unspecified   make_unique(Args&amp;&amp;...) = delete; // C++14, T == U[N]</a>
<a name="397"><span class="lineNum">     397 </span>                :            : </a>
<a name="398"><span class="lineNum">     398 </span>                :            : template&lt;class E, class T, class Y, class D&gt;</a>
<a name="399"><span class="lineNum">     399 </span>                :            :     basic_ostream&lt;E, T&gt;&amp; operator&lt;&lt; (basic_ostream&lt;E, T&gt;&amp; os, unique_ptr&lt;Y, D&gt; const&amp; p);</a>
<a name="400"><span class="lineNum">     400 </span>                :            : </a>
<a name="401"><span class="lineNum">     401 </span>                :            : template&lt;class T&gt;</a>
<a name="402"><span class="lineNum">     402 </span>                :            : class shared_ptr</a>
<a name="403"><span class="lineNum">     403 </span>                :            : {</a>
<a name="404"><span class="lineNum">     404 </span>                :            : public:</a>
<a name="405"><span class="lineNum">     405 </span>                :            :     typedef T element_type;</a>
<a name="406"><span class="lineNum">     406 </span>                :            :     typedef weak_ptr&lt;T&gt; weak_type; // C++17</a>
<a name="407"><span class="lineNum">     407 </span>                :            : </a>
<a name="408"><span class="lineNum">     408 </span>                :            :     // constructors:</a>
<a name="409"><span class="lineNum">     409 </span>                :            :     constexpr shared_ptr() noexcept;</a>
<a name="410"><span class="lineNum">     410 </span>                :            :     template&lt;class Y&gt; explicit shared_ptr(Y* p);</a>
<a name="411"><span class="lineNum">     411 </span>                :            :     template&lt;class Y, class D&gt; shared_ptr(Y* p, D d);</a>
<a name="412"><span class="lineNum">     412 </span>                :            :     template&lt;class Y, class D, class A&gt; shared_ptr(Y* p, D d, A a);</a>
<a name="413"><span class="lineNum">     413 </span>                :            :     template &lt;class D&gt; shared_ptr(nullptr_t p, D d);</a>
<a name="414"><span class="lineNum">     414 </span>                :            :     template &lt;class D, class A&gt; shared_ptr(nullptr_t p, D d, A a);</a>
<a name="415"><span class="lineNum">     415 </span>                :            :     template&lt;class Y&gt; shared_ptr(const shared_ptr&lt;Y&gt;&amp; r, T *p) noexcept;</a>
<a name="416"><span class="lineNum">     416 </span>                :            :     shared_ptr(const shared_ptr&amp; r) noexcept;</a>
<a name="417"><span class="lineNum">     417 </span>                :            :     template&lt;class Y&gt; shared_ptr(const shared_ptr&lt;Y&gt;&amp; r) noexcept;</a>
<a name="418"><span class="lineNum">     418 </span>                :            :     shared_ptr(shared_ptr&amp;&amp; r) noexcept;</a>
<a name="419"><span class="lineNum">     419 </span>                :            :     template&lt;class Y&gt; shared_ptr(shared_ptr&lt;Y&gt;&amp;&amp; r) noexcept;</a>
<a name="420"><span class="lineNum">     420 </span>                :            :     template&lt;class Y&gt; explicit shared_ptr(const weak_ptr&lt;Y&gt;&amp; r);</a>
<a name="421"><span class="lineNum">     421 </span>                :            :     template&lt;class Y&gt; shared_ptr(auto_ptr&lt;Y&gt;&amp;&amp; r);          // removed in C++17</a>
<a name="422"><span class="lineNum">     422 </span>                :            :     template &lt;class Y, class D&gt; shared_ptr(unique_ptr&lt;Y, D&gt;&amp;&amp; r);</a>
<a name="423"><span class="lineNum">     423 </span>                :            :     shared_ptr(nullptr_t) : shared_ptr() { }</a>
<a name="424"><span class="lineNum">     424 </span>                :            : </a>
<a name="425"><span class="lineNum">     425 </span>                :            :     // destructor:</a>
<a name="426"><span class="lineNum">     426 </span>                :            :     ~shared_ptr();</a>
<a name="427"><span class="lineNum">     427 </span>                :            : </a>
<a name="428"><span class="lineNum">     428 </span>                :            :     // assignment:</a>
<a name="429"><span class="lineNum">     429 </span>                :            :     shared_ptr&amp; operator=(const shared_ptr&amp; r) noexcept;</a>
<a name="430"><span class="lineNum">     430 </span>                :            :     template&lt;class Y&gt; shared_ptr&amp; operator=(const shared_ptr&lt;Y&gt;&amp; r) noexcept;</a>
<a name="431"><span class="lineNum">     431 </span>                :            :     shared_ptr&amp; operator=(shared_ptr&amp;&amp; r) noexcept;</a>
<a name="432"><span class="lineNum">     432 </span>                :            :     template&lt;class Y&gt; shared_ptr&amp; operator=(shared_ptr&lt;Y&gt;&amp;&amp; r);</a>
<a name="433"><span class="lineNum">     433 </span>                :            :     template&lt;class Y&gt; shared_ptr&amp; operator=(auto_ptr&lt;Y&gt;&amp;&amp; r); // removed in C++17</a>
<a name="434"><span class="lineNum">     434 </span>                :            :     template &lt;class Y, class D&gt; shared_ptr&amp; operator=(unique_ptr&lt;Y, D&gt;&amp;&amp; r);</a>
<a name="435"><span class="lineNum">     435 </span>                :            : </a>
<a name="436"><span class="lineNum">     436 </span>                :            :     // modifiers:</a>
<a name="437"><span class="lineNum">     437 </span>                :            :     void swap(shared_ptr&amp; r) noexcept;</a>
<a name="438"><span class="lineNum">     438 </span>                :            :     void reset() noexcept;</a>
<a name="439"><span class="lineNum">     439 </span>                :            :     template&lt;class Y&gt; void reset(Y* p);</a>
<a name="440"><span class="lineNum">     440 </span>                :            :     template&lt;class Y, class D&gt; void reset(Y* p, D d);</a>
<a name="441"><span class="lineNum">     441 </span>                :            :     template&lt;class Y, class D, class A&gt; void reset(Y* p, D d, A a);</a>
<a name="442"><span class="lineNum">     442 </span>                :            : </a>
<a name="443"><span class="lineNum">     443 </span>                :            :     // observers:</a>
<a name="444"><span class="lineNum">     444 </span>                :            :     T* get() const noexcept;</a>
<a name="445"><span class="lineNum">     445 </span>                :            :     T&amp; operator*() const noexcept;</a>
<a name="446"><span class="lineNum">     446 </span>                :            :     T* operator-&gt;() const noexcept;</a>
<a name="447"><span class="lineNum">     447 </span>                :            :     long use_count() const noexcept;</a>
<a name="448"><span class="lineNum">     448 </span>                :            :     bool unique() const noexcept;</a>
<a name="449"><span class="lineNum">     449 </span>                :            :     explicit operator bool() const noexcept;</a>
<a name="450"><span class="lineNum">     450 </span>                :            :     template&lt;class U&gt; bool owner_before(shared_ptr&lt;U&gt; const&amp; b) const noexcept;</a>
<a name="451"><span class="lineNum">     451 </span>                :            :     template&lt;class U&gt; bool owner_before(weak_ptr&lt;U&gt; const&amp; b) const noexcept;</a>
<a name="452"><span class="lineNum">     452 </span>                :            : };</a>
<a name="453"><span class="lineNum">     453 </span>                :            : </a>
<a name="454"><span class="lineNum">     454 </span>                :            : template&lt;class T&gt;</a>
<a name="455"><span class="lineNum">     455 </span>                :            : shared_ptr(weak_ptr&lt;T&gt;) -&gt; shared_ptr&lt;T&gt;;</a>
<a name="456"><span class="lineNum">     456 </span>                :            : template&lt;class T, class D&gt;</a>
<a name="457"><span class="lineNum">     457 </span>                :            : shared_ptr(unique_ptr&lt;T, D&gt;) -&gt; shared_ptr&lt;T&gt;;</a>
<a name="458"><span class="lineNum">     458 </span>                :            : </a>
<a name="459"><span class="lineNum">     459 </span>                :            : // shared_ptr comparisons:</a>
<a name="460"><span class="lineNum">     460 </span>                :            : template&lt;class T, class U&gt;</a>
<a name="461"><span class="lineNum">     461 </span>                :            :     bool operator==(shared_ptr&lt;T&gt; const&amp; a, shared_ptr&lt;U&gt; const&amp; b) noexcept;</a>
<a name="462"><span class="lineNum">     462 </span>                :            : template&lt;class T, class U&gt;</a>
<a name="463"><span class="lineNum">     463 </span>                :            :     bool operator!=(shared_ptr&lt;T&gt; const&amp; a, shared_ptr&lt;U&gt; const&amp; b) noexcept;</a>
<a name="464"><span class="lineNum">     464 </span>                :            : template&lt;class T, class U&gt;</a>
<a name="465"><span class="lineNum">     465 </span>                :            :     bool operator&lt;(shared_ptr&lt;T&gt; const&amp; a, shared_ptr&lt;U&gt; const&amp; b) noexcept;</a>
<a name="466"><span class="lineNum">     466 </span>                :            : template&lt;class T, class U&gt;</a>
<a name="467"><span class="lineNum">     467 </span>                :            :     bool operator&gt;(shared_ptr&lt;T&gt; const&amp; a, shared_ptr&lt;U&gt; const&amp; b) noexcept;</a>
<a name="468"><span class="lineNum">     468 </span>                :            : template&lt;class T, class U&gt;</a>
<a name="469"><span class="lineNum">     469 </span>                :            :     bool operator&lt;=(shared_ptr&lt;T&gt; const&amp; a, shared_ptr&lt;U&gt; const&amp; b) noexcept;</a>
<a name="470"><span class="lineNum">     470 </span>                :            : template&lt;class T, class U&gt;</a>
<a name="471"><span class="lineNum">     471 </span>                :            :     bool operator&gt;=(shared_ptr&lt;T&gt; const&amp; a, shared_ptr&lt;U&gt; const&amp; b) noexcept;</a>
<a name="472"><span class="lineNum">     472 </span>                :            : </a>
<a name="473"><span class="lineNum">     473 </span>                :            : template &lt;class T&gt;</a>
<a name="474"><span class="lineNum">     474 </span>                :            :     bool operator==(const shared_ptr&lt;T&gt;&amp; x, nullptr_t) noexcept;</a>
<a name="475"><span class="lineNum">     475 </span>                :            : template &lt;class T&gt;</a>
<a name="476"><span class="lineNum">     476 </span>                :            :     bool operator==(nullptr_t, const shared_ptr&lt;T&gt;&amp; y) noexcept;</a>
<a name="477"><span class="lineNum">     477 </span>                :            : template &lt;class T&gt;</a>
<a name="478"><span class="lineNum">     478 </span>                :            :     bool operator!=(const shared_ptr&lt;T&gt;&amp; x, nullptr_t) noexcept;</a>
<a name="479"><span class="lineNum">     479 </span>                :            : template &lt;class T&gt;</a>
<a name="480"><span class="lineNum">     480 </span>                :            :     bool operator!=(nullptr_t, const shared_ptr&lt;T&gt;&amp; y) noexcept;</a>
<a name="481"><span class="lineNum">     481 </span>                :            : template &lt;class T&gt;</a>
<a name="482"><span class="lineNum">     482 </span>                :            :     bool operator&lt;(const shared_ptr&lt;T&gt;&amp; x, nullptr_t) noexcept;</a>
<a name="483"><span class="lineNum">     483 </span>                :            : template &lt;class T&gt;</a>
<a name="484"><span class="lineNum">     484 </span>                :            : bool operator&lt;(nullptr_t, const shared_ptr&lt;T&gt;&amp; y) noexcept;</a>
<a name="485"><span class="lineNum">     485 </span>                :            : template &lt;class T&gt;</a>
<a name="486"><span class="lineNum">     486 </span>                :            :     bool operator&lt;=(const shared_ptr&lt;T&gt;&amp; x, nullptr_t) noexcept;</a>
<a name="487"><span class="lineNum">     487 </span>                :            : template &lt;class T&gt;</a>
<a name="488"><span class="lineNum">     488 </span>                :            :     bool operator&lt;=(nullptr_t, const shared_ptr&lt;T&gt;&amp; y) noexcept;</a>
<a name="489"><span class="lineNum">     489 </span>                :            : template &lt;class T&gt;</a>
<a name="490"><span class="lineNum">     490 </span>                :            :     bool operator&gt;(const shared_ptr&lt;T&gt;&amp; x, nullptr_t) noexcept;</a>
<a name="491"><span class="lineNum">     491 </span>                :            : template &lt;class T&gt;</a>
<a name="492"><span class="lineNum">     492 </span>                :            :     bool operator&gt;(nullptr_t, const shared_ptr&lt;T&gt;&amp; y) noexcept;</a>
<a name="493"><span class="lineNum">     493 </span>                :            : template &lt;class T&gt;</a>
<a name="494"><span class="lineNum">     494 </span>                :            :     bool operator&gt;=(const shared_ptr&lt;T&gt;&amp; x, nullptr_t) noexcept;</a>
<a name="495"><span class="lineNum">     495 </span>                :            : template &lt;class T&gt;</a>
<a name="496"><span class="lineNum">     496 </span>                :            :     bool operator&gt;=(nullptr_t, const shared_ptr&lt;T&gt;&amp; y) noexcept;</a>
<a name="497"><span class="lineNum">     497 </span>                :            : </a>
<a name="498"><span class="lineNum">     498 </span>                :            : // shared_ptr specialized algorithms:</a>
<a name="499"><span class="lineNum">     499 </span>                :            : template&lt;class T&gt; void swap(shared_ptr&lt;T&gt;&amp; a, shared_ptr&lt;T&gt;&amp; b) noexcept;</a>
<a name="500"><span class="lineNum">     500 </span>                :            : </a>
<a name="501"><span class="lineNum">     501 </span>                :            : // shared_ptr casts:</a>
<a name="502"><span class="lineNum">     502 </span>                :            : template&lt;class T, class U&gt;</a>
<a name="503"><span class="lineNum">     503 </span>                :            :     shared_ptr&lt;T&gt; static_pointer_cast(shared_ptr&lt;U&gt; const&amp; r) noexcept;</a>
<a name="504"><span class="lineNum">     504 </span>                :            : template&lt;class T, class U&gt;</a>
<a name="505"><span class="lineNum">     505 </span>                :            :     shared_ptr&lt;T&gt; dynamic_pointer_cast(shared_ptr&lt;U&gt; const&amp; r) noexcept;</a>
<a name="506"><span class="lineNum">     506 </span>                :            : template&lt;class T, class U&gt;</a>
<a name="507"><span class="lineNum">     507 </span>                :            :     shared_ptr&lt;T&gt; const_pointer_cast(shared_ptr&lt;U&gt; const&amp; r) noexcept;</a>
<a name="508"><span class="lineNum">     508 </span>                :            : </a>
<a name="509"><span class="lineNum">     509 </span>                :            : // shared_ptr I/O:</a>
<a name="510"><span class="lineNum">     510 </span>                :            : template&lt;class E, class T, class Y&gt;</a>
<a name="511"><span class="lineNum">     511 </span>                :            :     basic_ostream&lt;E, T&gt;&amp; operator&lt;&lt; (basic_ostream&lt;E, T&gt;&amp; os, shared_ptr&lt;Y&gt; const&amp; p);</a>
<a name="512"><span class="lineNum">     512 </span>                :            : </a>
<a name="513"><span class="lineNum">     513 </span>                :            : // shared_ptr get_deleter:</a>
<a name="514"><span class="lineNum">     514 </span>                :            : template&lt;class D, class T&gt; D* get_deleter(shared_ptr&lt;T&gt; const&amp; p) noexcept;</a>
<a name="515"><span class="lineNum">     515 </span>                :            : </a>
<a name="516"><span class="lineNum">     516 </span>                :            : template&lt;class T, class... Args&gt;</a>
<a name="517"><span class="lineNum">     517 </span>                :            :     shared_ptr&lt;T&gt; make_shared(Args&amp;&amp;... args);</a>
<a name="518"><span class="lineNum">     518 </span>                :            : template&lt;class T, class A, class... Args&gt;</a>
<a name="519"><span class="lineNum">     519 </span>                :            :     shared_ptr&lt;T&gt; allocate_shared(const A&amp; a, Args&amp;&amp;... args);</a>
<a name="520"><span class="lineNum">     520 </span>                :            : </a>
<a name="521"><span class="lineNum">     521 </span>                :            : template&lt;class T&gt;</a>
<a name="522"><span class="lineNum">     522 </span>                :            : class weak_ptr</a>
<a name="523"><span class="lineNum">     523 </span>                :            : {</a>
<a name="524"><span class="lineNum">     524 </span>                :            : public:</a>
<a name="525"><span class="lineNum">     525 </span>                :            :     typedef T element_type;</a>
<a name="526"><span class="lineNum">     526 </span>                :            : </a>
<a name="527"><span class="lineNum">     527 </span>                :            :     // constructors</a>
<a name="528"><span class="lineNum">     528 </span>                :            :     constexpr weak_ptr() noexcept;</a>
<a name="529"><span class="lineNum">     529 </span>                :            :     template&lt;class Y&gt; weak_ptr(shared_ptr&lt;Y&gt; const&amp; r) noexcept;</a>
<a name="530"><span class="lineNum">     530 </span>                :            :     weak_ptr(weak_ptr const&amp; r) noexcept;</a>
<a name="531"><span class="lineNum">     531 </span>                :            :     template&lt;class Y&gt; weak_ptr(weak_ptr&lt;Y&gt; const&amp; r) noexcept;</a>
<a name="532"><span class="lineNum">     532 </span>                :            :     weak_ptr(weak_ptr&amp;&amp; r) noexcept;                      // C++14</a>
<a name="533"><span class="lineNum">     533 </span>                :            :     template&lt;class Y&gt; weak_ptr(weak_ptr&lt;Y&gt;&amp;&amp; r) noexcept; // C++14</a>
<a name="534"><span class="lineNum">     534 </span>                :            : </a>
<a name="535"><span class="lineNum">     535 </span>                :            :     // destructor</a>
<a name="536"><span class="lineNum">     536 </span>                :            :     ~weak_ptr();</a>
<a name="537"><span class="lineNum">     537 </span>                :            : </a>
<a name="538"><span class="lineNum">     538 </span>                :            :     // assignment</a>
<a name="539"><span class="lineNum">     539 </span>                :            :     weak_ptr&amp; operator=(weak_ptr const&amp; r) noexcept;</a>
<a name="540"><span class="lineNum">     540 </span>                :            :     template&lt;class Y&gt; weak_ptr&amp; operator=(weak_ptr&lt;Y&gt; const&amp; r) noexcept;</a>
<a name="541"><span class="lineNum">     541 </span>                :            :     template&lt;class Y&gt; weak_ptr&amp; operator=(shared_ptr&lt;Y&gt; const&amp; r) noexcept;</a>
<a name="542"><span class="lineNum">     542 </span>                :            :     weak_ptr&amp; operator=(weak_ptr&amp;&amp; r) noexcept;                      // C++14</a>
<a name="543"><span class="lineNum">     543 </span>                :            :     template&lt;class Y&gt; weak_ptr&amp; operator=(weak_ptr&lt;Y&gt;&amp;&amp; r) noexcept; // C++14</a>
<a name="544"><span class="lineNum">     544 </span>                :            : </a>
<a name="545"><span class="lineNum">     545 </span>                :            :     // modifiers</a>
<a name="546"><span class="lineNum">     546 </span>                :            :     void swap(weak_ptr&amp; r) noexcept;</a>
<a name="547"><span class="lineNum">     547 </span>                :            :     void reset() noexcept;</a>
<a name="548"><span class="lineNum">     548 </span>                :            : </a>
<a name="549"><span class="lineNum">     549 </span>                :            :     // observers</a>
<a name="550"><span class="lineNum">     550 </span>                :            :     long use_count() const noexcept;</a>
<a name="551"><span class="lineNum">     551 </span>                :            :     bool expired() const noexcept;</a>
<a name="552"><span class="lineNum">     552 </span>                :            :     shared_ptr&lt;T&gt; lock() const noexcept;</a>
<a name="553"><span class="lineNum">     553 </span>                :            :     template&lt;class U&gt; bool owner_before(shared_ptr&lt;U&gt; const&amp; b) const noexcept;</a>
<a name="554"><span class="lineNum">     554 </span>                :            :     template&lt;class U&gt; bool owner_before(weak_ptr&lt;U&gt; const&amp; b) const noexcept;</a>
<a name="555"><span class="lineNum">     555 </span>                :            : };</a>
<a name="556"><span class="lineNum">     556 </span>                :            : </a>
<a name="557"><span class="lineNum">     557 </span>                :            : template&lt;class T&gt;</a>
<a name="558"><span class="lineNum">     558 </span>                :            : weak_ptr(shared_ptr&lt;T&gt;) -&gt; weak_ptr&lt;T&gt;;</a>
<a name="559"><span class="lineNum">     559 </span>                :            : </a>
<a name="560"><span class="lineNum">     560 </span>                :            : // weak_ptr specialized algorithms:</a>
<a name="561"><span class="lineNum">     561 </span>                :            : template&lt;class T&gt; void swap(weak_ptr&lt;T&gt;&amp; a, weak_ptr&lt;T&gt;&amp; b) noexcept;</a>
<a name="562"><span class="lineNum">     562 </span>                :            : </a>
<a name="563"><span class="lineNum">     563 </span>                :            : // class owner_less:</a>
<a name="564"><span class="lineNum">     564 </span>                :            : template&lt;class T&gt; struct owner_less;</a>
<a name="565"><span class="lineNum">     565 </span>                :            : </a>
<a name="566"><span class="lineNum">     566 </span>                :            : template&lt;class T&gt;</a>
<a name="567"><span class="lineNum">     567 </span>                :            : struct owner_less&lt;shared_ptr&lt;T&gt; &gt;</a>
<a name="568"><span class="lineNum">     568 </span>                :            :     : binary_function&lt;shared_ptr&lt;T&gt;, shared_ptr&lt;T&gt;, bool&gt;</a>
<a name="569"><span class="lineNum">     569 </span>                :            : {</a>
<a name="570"><span class="lineNum">     570 </span>                :            :     typedef bool result_type;</a>
<a name="571"><span class="lineNum">     571 </span>                :            :     bool operator()(shared_ptr&lt;T&gt; const&amp;, shared_ptr&lt;T&gt; const&amp;) const noexcept;</a>
<a name="572"><span class="lineNum">     572 </span>                :            :     bool operator()(shared_ptr&lt;T&gt; const&amp;, weak_ptr&lt;T&gt; const&amp;) const noexcept;</a>
<a name="573"><span class="lineNum">     573 </span>                :            :     bool operator()(weak_ptr&lt;T&gt; const&amp;, shared_ptr&lt;T&gt; const&amp;) const noexcept;</a>
<a name="574"><span class="lineNum">     574 </span>                :            : };</a>
<a name="575"><span class="lineNum">     575 </span>                :            : </a>
<a name="576"><span class="lineNum">     576 </span>                :            : template&lt;class T&gt;</a>
<a name="577"><span class="lineNum">     577 </span>                :            : struct owner_less&lt;weak_ptr&lt;T&gt; &gt;</a>
<a name="578"><span class="lineNum">     578 </span>                :            :     : binary_function&lt;weak_ptr&lt;T&gt;, weak_ptr&lt;T&gt;, bool&gt;</a>
<a name="579"><span class="lineNum">     579 </span>                :            : {</a>
<a name="580"><span class="lineNum">     580 </span>                :            :     typedef bool result_type;</a>
<a name="581"><span class="lineNum">     581 </span>                :            :     bool operator()(weak_ptr&lt;T&gt; const&amp;, weak_ptr&lt;T&gt; const&amp;) const noexcept;</a>
<a name="582"><span class="lineNum">     582 </span>                :            :     bool operator()(shared_ptr&lt;T&gt; const&amp;, weak_ptr&lt;T&gt; const&amp;) const noexcept;</a>
<a name="583"><span class="lineNum">     583 </span>                :            :     bool operator()(weak_ptr&lt;T&gt; const&amp;, shared_ptr&lt;T&gt; const&amp;) const noexcept;</a>
<a name="584"><span class="lineNum">     584 </span>                :            : };</a>
<a name="585"><span class="lineNum">     585 </span>                :            : </a>
<a name="586"><span class="lineNum">     586 </span>                :            : template &lt;&gt;  // Added in C++14</a>
<a name="587"><span class="lineNum">     587 </span>                :            : struct owner_less&lt;void&gt;</a>
<a name="588"><span class="lineNum">     588 </span>                :            : {</a>
<a name="589"><span class="lineNum">     589 </span>                :            :     template &lt;class _Tp, class _Up&gt;</a>
<a name="590"><span class="lineNum">     590 </span>                :            :     bool operator()( shared_ptr&lt;_Tp&gt; const&amp; __x, shared_ptr&lt;_Up&gt; const&amp; __y) const noexcept;</a>
<a name="591"><span class="lineNum">     591 </span>                :            :     template &lt;class _Tp, class _Up&gt;</a>
<a name="592"><span class="lineNum">     592 </span>                :            :     bool operator()( shared_ptr&lt;_Tp&gt; const&amp; __x,   weak_ptr&lt;_Up&gt; const&amp; __y) const noexcept;</a>
<a name="593"><span class="lineNum">     593 </span>                :            :     template &lt;class _Tp, class _Up&gt;</a>
<a name="594"><span class="lineNum">     594 </span>                :            :     bool operator()(   weak_ptr&lt;_Tp&gt; const&amp; __x, shared_ptr&lt;_Up&gt; const&amp; __y) const noexcept;</a>
<a name="595"><span class="lineNum">     595 </span>                :            :     template &lt;class _Tp, class _Up&gt;</a>
<a name="596"><span class="lineNum">     596 </span>                :            :     bool operator()(   weak_ptr&lt;_Tp&gt; const&amp; __x,   weak_ptr&lt;_Up&gt; const&amp; __y) const noexcept;</a>
<a name="597"><span class="lineNum">     597 </span>                :            : </a>
<a name="598"><span class="lineNum">     598 </span>                :            :     typedef void is_transparent;</a>
<a name="599"><span class="lineNum">     599 </span>                :            : };</a>
<a name="600"><span class="lineNum">     600 </span>                :            : </a>
<a name="601"><span class="lineNum">     601 </span>                :            : template&lt;class T&gt;</a>
<a name="602"><span class="lineNum">     602 </span>                :            : class enable_shared_from_this</a>
<a name="603"><span class="lineNum">     603 </span>                :            : {</a>
<a name="604"><span class="lineNum">     604 </span>                :            : protected:</a>
<a name="605"><span class="lineNum">     605 </span>                :            :     constexpr enable_shared_from_this() noexcept;</a>
<a name="606"><span class="lineNum">     606 </span>                :            :     enable_shared_from_this(enable_shared_from_this const&amp;) noexcept;</a>
<a name="607"><span class="lineNum">     607 </span>                :            :     enable_shared_from_this&amp; operator=(enable_shared_from_this const&amp;) noexcept;</a>
<a name="608"><span class="lineNum">     608 </span>                :            :     ~enable_shared_from_this();</a>
<a name="609"><span class="lineNum">     609 </span>                :            : public:</a>
<a name="610"><span class="lineNum">     610 </span>                :            :     shared_ptr&lt;T&gt; shared_from_this();</a>
<a name="611"><span class="lineNum">     611 </span>                :            :     shared_ptr&lt;T const&gt; shared_from_this() const;</a>
<a name="612"><span class="lineNum">     612 </span>                :            : };</a>
<a name="613"><span class="lineNum">     613 </span>                :            : </a>
<a name="614"><span class="lineNum">     614 </span>                :            : template&lt;class T&gt;</a>
<a name="615"><span class="lineNum">     615 </span>                :            :     bool atomic_is_lock_free(const shared_ptr&lt;T&gt;* p);</a>
<a name="616"><span class="lineNum">     616 </span>                :            : template&lt;class T&gt;</a>
<a name="617"><span class="lineNum">     617 </span>                :            :     shared_ptr&lt;T&gt; atomic_load(const shared_ptr&lt;T&gt;* p);</a>
<a name="618"><span class="lineNum">     618 </span>                :            : template&lt;class T&gt;</a>
<a name="619"><span class="lineNum">     619 </span>                :            :     shared_ptr&lt;T&gt; atomic_load_explicit(const shared_ptr&lt;T&gt;* p, memory_order mo);</a>
<a name="620"><span class="lineNum">     620 </span>                :            : template&lt;class T&gt;</a>
<a name="621"><span class="lineNum">     621 </span>                :            :     void atomic_store(shared_ptr&lt;T&gt;* p, shared_ptr&lt;T&gt; r);</a>
<a name="622"><span class="lineNum">     622 </span>                :            : template&lt;class T&gt;</a>
<a name="623"><span class="lineNum">     623 </span>                :            :     void atomic_store_explicit(shared_ptr&lt;T&gt;* p, shared_ptr&lt;T&gt; r, memory_order mo);</a>
<a name="624"><span class="lineNum">     624 </span>                :            : template&lt;class T&gt;</a>
<a name="625"><span class="lineNum">     625 </span>                :            :     shared_ptr&lt;T&gt; atomic_exchange(shared_ptr&lt;T&gt;* p, shared_ptr&lt;T&gt; r);</a>
<a name="626"><span class="lineNum">     626 </span>                :            : template&lt;class T&gt;</a>
<a name="627"><span class="lineNum">     627 </span>                :            :     shared_ptr&lt;T&gt;</a>
<a name="628"><span class="lineNum">     628 </span>                :            :     atomic_exchange_explicit(shared_ptr&lt;T&gt;* p, shared_ptr&lt;T&gt; r, memory_order mo);</a>
<a name="629"><span class="lineNum">     629 </span>                :            : template&lt;class T&gt;</a>
<a name="630"><span class="lineNum">     630 </span>                :            :     bool</a>
<a name="631"><span class="lineNum">     631 </span>                :            :     atomic_compare_exchange_weak(shared_ptr&lt;T&gt;* p, shared_ptr&lt;T&gt;* v, shared_ptr&lt;T&gt; w);</a>
<a name="632"><span class="lineNum">     632 </span>                :            : template&lt;class T&gt;</a>
<a name="633"><span class="lineNum">     633 </span>                :            :     bool</a>
<a name="634"><span class="lineNum">     634 </span>                :            :     atomic_compare_exchange_strong( shared_ptr&lt;T&gt;* p, shared_ptr&lt;T&gt;* v, shared_ptr&lt;T&gt; w);</a>
<a name="635"><span class="lineNum">     635 </span>                :            : template&lt;class T&gt;</a>
<a name="636"><span class="lineNum">     636 </span>                :            :     bool</a>
<a name="637"><span class="lineNum">     637 </span>                :            :     atomic_compare_exchange_weak_explicit(shared_ptr&lt;T&gt;* p, shared_ptr&lt;T&gt;* v,</a>
<a name="638"><span class="lineNum">     638 </span>                :            :                                           shared_ptr&lt;T&gt; w, memory_order success,</a>
<a name="639"><span class="lineNum">     639 </span>                :            :                                           memory_order failure);</a>
<a name="640"><span class="lineNum">     640 </span>                :            : template&lt;class T&gt;</a>
<a name="641"><span class="lineNum">     641 </span>                :            :     bool</a>
<a name="642"><span class="lineNum">     642 </span>                :            :     atomic_compare_exchange_strong_explicit(shared_ptr&lt;T&gt;* p, shared_ptr&lt;T&gt;* v,</a>
<a name="643"><span class="lineNum">     643 </span>                :            :                                             shared_ptr&lt;T&gt; w, memory_order success,</a>
<a name="644"><span class="lineNum">     644 </span>                :            :                                             memory_order failure);</a>
<a name="645"><span class="lineNum">     645 </span>                :            : // Hash support</a>
<a name="646"><span class="lineNum">     646 </span>                :            : template &lt;class T&gt; struct hash;</a>
<a name="647"><span class="lineNum">     647 </span>                :            : template &lt;class T, class D&gt; struct hash&lt;unique_ptr&lt;T, D&gt; &gt;;</a>
<a name="648"><span class="lineNum">     648 </span>                :            : template &lt;class T&gt; struct hash&lt;shared_ptr&lt;T&gt; &gt;;</a>
<a name="649"><span class="lineNum">     649 </span>                :            : </a>
<a name="650"><span class="lineNum">     650 </span>                :            : template &lt;class T, class Alloc&gt;</a>
<a name="651"><span class="lineNum">     651 </span>                :            :   inline constexpr bool uses_allocator_v = uses_allocator&lt;T, Alloc&gt;::value;</a>
<a name="652"><span class="lineNum">     652 </span>                :            : </a>
<a name="653"><span class="lineNum">     653 </span>                :            : // Pointer safety</a>
<a name="654"><span class="lineNum">     654 </span>                :            : enum class pointer_safety { relaxed, preferred, strict };</a>
<a name="655"><span class="lineNum">     655 </span>                :            : void declare_reachable(void *p);</a>
<a name="656"><span class="lineNum">     656 </span>                :            : template &lt;class T&gt; T *undeclare_reachable(T *p);</a>
<a name="657"><span class="lineNum">     657 </span>                :            : void declare_no_pointers(char *p, size_t n);</a>
<a name="658"><span class="lineNum">     658 </span>                :            : void undeclare_no_pointers(char *p, size_t n);</a>
<a name="659"><span class="lineNum">     659 </span>                :            : pointer_safety get_pointer_safety() noexcept;</a>
<a name="660"><span class="lineNum">     660 </span>                :            : </a>
<a name="661"><span class="lineNum">     661 </span>                :            : void* align(size_t alignment, size_t size, void*&amp; ptr, size_t&amp; space);</a>
<a name="662"><span class="lineNum">     662 </span>                :            : </a>
<a name="663"><span class="lineNum">     663 </span>                :            : }  // std</a>
<a name="664"><span class="lineNum">     664 </span>                :            : </a>
<a name="665"><span class="lineNum">     665 </span>                :            : */</a>
<a name="666"><span class="lineNum">     666 </span>                :            : </a>
<a name="667"><span class="lineNum">     667 </span>                :            : #include &lt;__config&gt;</a>
<a name="668"><span class="lineNum">     668 </span>                :            : #include &lt;__availability&gt;</a>
<a name="669"><span class="lineNum">     669 </span>                :            : #include &lt;type_traits&gt;</a>
<a name="670"><span class="lineNum">     670 </span>                :            : #include &lt;typeinfo&gt;</a>
<a name="671"><span class="lineNum">     671 </span>                :            : #include &lt;cstddef&gt;</a>
<a name="672"><span class="lineNum">     672 </span>                :            : #include &lt;cstdint&gt;</a>
<a name="673"><span class="lineNum">     673 </span>                :            : #include &lt;new&gt;</a>
<a name="674"><span class="lineNum">     674 </span>                :            : #include &lt;utility&gt;</a>
<a name="675"><span class="lineNum">     675 </span>                :            : #include &lt;limits&gt;</a>
<a name="676"><span class="lineNum">     676 </span>                :            : #include &lt;iterator&gt;</a>
<a name="677"><span class="lineNum">     677 </span>                :            : #include &lt;__functional_base&gt;</a>
<a name="678"><span class="lineNum">     678 </span>                :            : #include &lt;iosfwd&gt;</a>
<a name="679"><span class="lineNum">     679 </span>                :            : #include &lt;tuple&gt;</a>
<a name="680"><span class="lineNum">     680 </span>                :            : #include &lt;stdexcept&gt;</a>
<a name="681"><span class="lineNum">     681 </span>                :            : #include &lt;cstring&gt;</a>
<a name="682"><span class="lineNum">     682 </span>                :            : #include &lt;__memory/allocator_traits.h&gt;</a>
<a name="683"><span class="lineNum">     683 </span>                :            : #include &lt;__memory/base.h&gt;</a>
<a name="684"><span class="lineNum">     684 </span>                :            : #include &lt;__memory/pointer_traits.h&gt;</a>
<a name="685"><span class="lineNum">     685 </span>                :            : #include &lt;__memory/utilities.h&gt;</a>
<a name="686"><span class="lineNum">     686 </span>                :            : #if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)</a>
<a name="687"><span class="lineNum">     687 </span>                :            : #  include &lt;atomic&gt;</a>
<a name="688"><span class="lineNum">     688 </span>                :            : #endif</a>
<a name="689"><span class="lineNum">     689 </span>                :            : #include &lt;version&gt;</a>
<a name="690"><span class="lineNum">     690 </span>                :            : </a>
<a name="691"><span class="lineNum">     691 </span>                :            : #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)</a>
<a name="692"><span class="lineNum">     692 </span>                :            : #pragma GCC system_header</a>
<a name="693"><span class="lineNum">     693 </span>                :            : #endif</a>
<a name="694"><span class="lineNum">     694 </span>                :            : </a>
<a name="695"><span class="lineNum">     695 </span>                :            : _LIBCPP_PUSH_MACROS</a>
<a name="696"><span class="lineNum">     696 </span>                :            : #include &lt;__undef_macros&gt;</a>
<a name="697"><span class="lineNum">     697 </span>                :            : </a>
<a name="698"><span class="lineNum">     698 </span>                :            : </a>
<a name="699"><span class="lineNum">     699 </span>                :            : _LIBCPP_BEGIN_NAMESPACE_STD</a>
<a name="700"><span class="lineNum">     700 </span>                :            : </a>
<a name="701"><span class="lineNum">     701 </span>                :            : template &lt;class _ValueType&gt;</a>
<a name="702"><span class="lineNum">     702 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="703"><span class="lineNum">     703 </span>                :            : _ValueType __libcpp_relaxed_load(_ValueType const* __value) {</a>
<a name="704"><span class="lineNum">     704 </span>                :            : #if !defined(_LIBCPP_HAS_NO_THREADS) &amp;&amp; \</a>
<a name="705"><span class="lineNum">     705 </span>                :            :     defined(__ATOMIC_RELAXED) &amp;&amp;        \</a>
<a name="706"><span class="lineNum">     706 </span>                :            :     (__has_builtin(__atomic_load_n) || defined(_LIBCPP_COMPILER_GCC))</a>
<a name="707"><span class="lineNum">     707 </span>                :            :     return __atomic_load_n(__value, __ATOMIC_RELAXED);</a>
<a name="708"><span class="lineNum">     708 </span>                :            : #else</a>
<a name="709"><span class="lineNum">     709 </span>                :            :     return *__value;</a>
<a name="710"><span class="lineNum">     710 </span>                :            : #endif</a>
<a name="711"><span class="lineNum">     711 </span>                :            : }</a>
<a name="712"><span class="lineNum">     712 </span>                :            : </a>
<a name="713"><span class="lineNum">     713 </span>                :            : template &lt;class _ValueType&gt;</a>
<a name="714"><span class="lineNum">     714 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="715"><span class="lineNum">     715 </span>                :            : _ValueType __libcpp_acquire_load(_ValueType const* __value) {</a>
<a name="716"><span class="lineNum">     716 </span>                :            : #if !defined(_LIBCPP_HAS_NO_THREADS) &amp;&amp; \</a>
<a name="717"><span class="lineNum">     717 </span>                :            :     defined(__ATOMIC_ACQUIRE) &amp;&amp;        \</a>
<a name="718"><span class="lineNum">     718 </span>                :            :     (__has_builtin(__atomic_load_n) || defined(_LIBCPP_COMPILER_GCC))</a>
<a name="719"><span class="lineNum">     719 </span>                :            :     return __atomic_load_n(__value, __ATOMIC_ACQUIRE);</a>
<a name="720"><span class="lineNum">     720 </span>                :            : #else</a>
<a name="721"><span class="lineNum">     721 </span>                :            :     return *__value;</a>
<a name="722"><span class="lineNum">     722 </span>                :            : #endif</a>
<a name="723"><span class="lineNum">     723 </span>                :            : }</a>
<a name="724"><span class="lineNum">     724 </span>                :            : </a>
<a name="725"><span class="lineNum">     725 </span>                :            : template &lt;bool _UsePointerTraits&gt; struct __to_address_helper;</a>
<a name="726"><span class="lineNum">     726 </span>                :            : </a>
<a name="727"><span class="lineNum">     727 </span>                :            : template &lt;&gt; struct __to_address_helper&lt;true&gt; {</a>
<a name="728"><span class="lineNum">     728 </span>                :            :     template &lt;class _Pointer&gt;</a>
<a name="729"><span class="lineNum">     729 </span>                :            :     using __return_type = decltype(pointer_traits&lt;_Pointer&gt;::to_address(_VSTD::declval&lt;const _Pointer&amp;&gt;()));</a>
<a name="730"><span class="lineNum">     730 </span>                :            : </a>
<a name="731"><span class="lineNum">     731 </span>                :            :     template &lt;class _Pointer&gt;</a>
<a name="732"><span class="lineNum">     732 </span>                :            :     _LIBCPP_CONSTEXPR</a>
<a name="733"><span class="lineNum">     733 </span>                :            :     static __return_type&lt;_Pointer&gt;</a>
<a name="734"><span class="lineNum">     734 </span>                :            :     __do_it(const _Pointer &amp;__p) _NOEXCEPT { return pointer_traits&lt;_Pointer&gt;::to_address(__p); }</a>
<a name="735"><span class="lineNum">     735 </span>                :            : };</a>
<a name="736"><span class="lineNum">     736 </span>                :            : </a>
<a name="737"><span class="lineNum">     737 </span>                :            : template &lt;class _Pointer, bool _Dummy = true&gt;</a>
<a name="738"><span class="lineNum">     738 </span>                :            : using __choose_to_address = __to_address_helper&lt;_IsValidExpansion&lt;__to_address_helper&lt;_Dummy&gt;::template __return_type, _Pointer&gt;::value&gt;;</a>
<a name="739"><span class="lineNum">     739 </span>                :            : </a>
<a name="740"><span class="lineNum">     740 </span>                :            : </a>
<a name="741"><span class="lineNum">     741 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="742"><span class="lineNum">     742 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR</a>
<a name="743"><span class="lineNum">     743 </span>                :            : _Tp*</a>
<a name="744"><span class="lineNum">     744 </span>                :<span class="lineCov">          3 : __to_address(_Tp* __p) _NOEXCEPT</span></a>
<a name="745"><span class="lineNum">     745 </span>                :            : {</a>
<a name="746"><span class="lineNum">     746 </span>                :            :     static_assert(!is_function&lt;_Tp&gt;::value, &quot;_Tp is a function type&quot;);</a>
<a name="747"><span class="lineNum">     747 </span>                :<span class="lineCov">          3 :     return __p;</span></a>
<a name="748"><span class="lineNum">     748 </span>                :            : }</a>
<a name="749"><span class="lineNum">     749 </span>                :            : </a>
<a name="750"><span class="lineNum">     750 </span>                :            : template &lt;class _Pointer&gt;</a>
<a name="751"><span class="lineNum">     751 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR</a>
<a name="752"><span class="lineNum">     752 </span>                :            : typename __choose_to_address&lt;_Pointer&gt;::template __return_type&lt;_Pointer&gt;</a>
<a name="753"><span class="lineNum">     753 </span>                :            : __to_address(const _Pointer&amp; __p) _NOEXCEPT {</a>
<a name="754"><span class="lineNum">     754 </span>                :            :   return __choose_to_address&lt;_Pointer&gt;::__do_it(__p);</a>
<a name="755"><span class="lineNum">     755 </span>                :            : }</a>
<a name="756"><span class="lineNum">     756 </span>                :            : </a>
<a name="757"><span class="lineNum">     757 </span>                :            : template &lt;&gt; struct __to_address_helper&lt;false&gt; {</a>
<a name="758"><span class="lineNum">     758 </span>                :            :     template &lt;class _Pointer&gt;</a>
<a name="759"><span class="lineNum">     759 </span>                :            :     using __return_type = typename pointer_traits&lt;_Pointer&gt;::element_type*;</a>
<a name="760"><span class="lineNum">     760 </span>                :            : </a>
<a name="761"><span class="lineNum">     761 </span>                :            :     template &lt;class _Pointer&gt;</a>
<a name="762"><span class="lineNum">     762 </span>                :            :     _LIBCPP_CONSTEXPR</a>
<a name="763"><span class="lineNum">     763 </span>                :            :     static __return_type&lt;_Pointer&gt;</a>
<a name="764"><span class="lineNum">     764 </span>                :            :     __do_it(const _Pointer &amp;__p) _NOEXCEPT { return _VSTD::__to_address(__p.operator-&gt;()); }</a>
<a name="765"><span class="lineNum">     765 </span>                :            : };</a>
<a name="766"><span class="lineNum">     766 </span>                :            : </a>
<a name="767"><span class="lineNum">     767 </span>                :            : </a>
<a name="768"><span class="lineNum">     768 </span>                :            : #if _LIBCPP_STD_VER &gt; 17</a>
<a name="769"><span class="lineNum">     769 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="770"><span class="lineNum">     770 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY constexpr</a>
<a name="771"><span class="lineNum">     771 </span>                :            : _Tp*</a>
<a name="772"><span class="lineNum">     772 </span>                :            : to_address(_Tp* __p) _NOEXCEPT</a>
<a name="773"><span class="lineNum">     773 </span>                :            : {</a>
<a name="774"><span class="lineNum">     774 </span>                :            :     static_assert(!is_function_v&lt;_Tp&gt;, &quot;_Tp is a function type&quot;);</a>
<a name="775"><span class="lineNum">     775 </span>                :            :     return __p;</a>
<a name="776"><span class="lineNum">     776 </span>                :            : }</a>
<a name="777"><span class="lineNum">     777 </span>                :            : </a>
<a name="778"><span class="lineNum">     778 </span>                :            : template &lt;class _Pointer&gt;</a>
<a name="779"><span class="lineNum">     779 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY constexpr</a>
<a name="780"><span class="lineNum">     780 </span>                :            : auto</a>
<a name="781"><span class="lineNum">     781 </span>                :            : to_address(const _Pointer&amp; __p) _NOEXCEPT</a>
<a name="782"><span class="lineNum">     782 </span>                :            : {</a>
<a name="783"><span class="lineNum">     783 </span>                :            :     return _VSTD::__to_address(__p);</a>
<a name="784"><span class="lineNum">     784 </span>                :            : }</a>
<a name="785"><span class="lineNum">     785 </span>                :            : #endif</a>
<a name="786"><span class="lineNum">     786 </span>                :            : </a>
<a name="787"><span class="lineNum">     787 </span>                :            : template &lt;class _Tp&gt; class allocator;</a>
<a name="788"><span class="lineNum">     788 </span>                :            : </a>
<a name="789"><span class="lineNum">     789 </span>                :            : #if _LIBCPP_STD_VER &lt;= 17</a>
<a name="790"><span class="lineNum">     790 </span>                :            : template &lt;&gt;</a>
<a name="791"><span class="lineNum">     791 </span>                :            : class _LIBCPP_TEMPLATE_VIS allocator&lt;void&gt;</a>
<a name="792"><span class="lineNum">     792 </span>                :            : {</a>
<a name="793"><span class="lineNum">     793 </span>                :            : public:</a>
<a name="794"><span class="lineNum">     794 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef void*             pointer;</a>
<a name="795"><span class="lineNum">     795 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       const_pointer;</a>
<a name="796"><span class="lineNum">     796 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef void              value_type;</a>
<a name="797"><span class="lineNum">     797 </span>                :            : </a>
<a name="798"><span class="lineNum">     798 </span>                :            :     template &lt;class _Up&gt; struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {typedef allocator&lt;_Up&gt; other;};</a>
<a name="799"><span class="lineNum">     799 </span>                :            : };</a>
<a name="800"><span class="lineNum">     800 </span>                :            : </a>
<a name="801"><span class="lineNum">     801 </span>                :            : template &lt;&gt;</a>
<a name="802"><span class="lineNum">     802 </span>                :            : class _LIBCPP_TEMPLATE_VIS allocator&lt;const void&gt;</a>
<a name="803"><span class="lineNum">     803 </span>                :            : {</a>
<a name="804"><span class="lineNum">     804 </span>                :            : public:</a>
<a name="805"><span class="lineNum">     805 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       pointer;</a>
<a name="806"><span class="lineNum">     806 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       const_pointer;</a>
<a name="807"><span class="lineNum">     807 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef const void        value_type;</a>
<a name="808"><span class="lineNum">     808 </span>                :            : </a>
<a name="809"><span class="lineNum">     809 </span>                :            :     template &lt;class _Up&gt; struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {typedef allocator&lt;_Up&gt; other;};</a>
<a name="810"><span class="lineNum">     810 </span>                :            : };</a>
<a name="811"><span class="lineNum">     811 </span>                :            : #endif</a>
<a name="812"><span class="lineNum">     812 </span>                :            : </a>
<a name="813"><span class="lineNum">     813 </span>                :            : // This class provides a non-trivial default constructor to the class that derives from it</a>
<a name="814"><span class="lineNum">     814 </span>                :            : // if the condition is satisfied.</a>
<a name="815"><span class="lineNum">     815 </span>                :            : //</a>
<a name="816"><span class="lineNum">     816 </span>                :            : // The second template parameter exists to allow giving a unique type to __non_trivial_if,</a>
<a name="817"><span class="lineNum">     817 </span>                :            : // which makes it possible to avoid breaking the ABI when making this a base class of an</a>
<a name="818"><span class="lineNum">     818 </span>                :            : // existing class. Without that, imagine we have classes D1 and D2, both of which used to</a>
<a name="819"><span class="lineNum">     819 </span>                :            : // have no base classes, but which now derive from __non_trivial_if. The layout of a class</a>
<a name="820"><span class="lineNum">     820 </span>                :            : // that inherits from both D1 and D2 will change because the two __non_trivial_if base</a>
<a name="821"><span class="lineNum">     821 </span>                :            : // classes are not allowed to share the same address.</a>
<a name="822"><span class="lineNum">     822 </span>                :            : //</a>
<a name="823"><span class="lineNum">     823 </span>                :            : // By making those __non_trivial_if base classes unique, we work around this problem and</a>
<a name="824"><span class="lineNum">     824 </span>                :            : // it is safe to start deriving from __non_trivial_if in existing classes.</a>
<a name="825"><span class="lineNum">     825 </span>                :            : template &lt;bool _Cond, class _Unique&gt;</a>
<a name="826"><span class="lineNum">     826 </span>                :            : struct __non_trivial_if { };</a>
<a name="827"><span class="lineNum">     827 </span>                :            : </a>
<a name="828"><span class="lineNum">     828 </span>                :            : template &lt;class _Unique&gt;</a>
<a name="829"><span class="lineNum">     829 </span>                :            : struct __non_trivial_if&lt;true, _Unique&gt; {</a>
<a name="830"><span class="lineNum">     830 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="831"><span class="lineNum">     831 </span>                :<span class="lineCov">          2 :     _LIBCPP_CONSTEXPR __non_trivial_if() _NOEXCEPT { }</span></a>
<a name="832"><span class="lineNum">     832 </span>                :            : };</a>
<a name="833"><span class="lineNum">     833 </span>                :            : </a>
<a name="834"><span class="lineNum">     834 </span>                :            : // allocator</a>
<a name="835"><span class="lineNum">     835 </span>                :            : //</a>
<a name="836"><span class="lineNum">     836 </span>                :            : // Note: For ABI compatibility between C++20 and previous standards, we make</a>
<a name="837"><span class="lineNum">     837 </span>                :            : //       allocator&lt;void&gt; trivial in C++20.</a>
<a name="838"><span class="lineNum">     838 </span>                :            : </a>
<a name="839"><span class="lineNum">     839 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="840"><span class="lineNum">     840 </span>                :            : class _LIBCPP_TEMPLATE_VIS allocator</a>
<a name="841"><span class="lineNum">     841 </span>                :            :     : private __non_trivial_if&lt;!is_void&lt;_Tp&gt;::value, allocator&lt;_Tp&gt; &gt;</a>
<a name="842"><span class="lineNum">     842 </span>                :            : {</a>
<a name="843"><span class="lineNum">     843 </span>                :            : public:</a>
<a name="844"><span class="lineNum">     844 </span>                :            :     typedef size_t      size_type;</a>
<a name="845"><span class="lineNum">     845 </span>                :            :     typedef ptrdiff_t   difference_type;</a>
<a name="846"><span class="lineNum">     846 </span>                :            :     typedef _Tp         value_type;</a>
<a name="847"><span class="lineNum">     847 </span>                :            :     typedef true_type   propagate_on_container_move_assignment;</a>
<a name="848"><span class="lineNum">     848 </span>                :            :     typedef true_type   is_always_equal;</a>
<a name="849"><span class="lineNum">     849 </span>                :            : </a>
<a name="850"><span class="lineNum">     850 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="851"><span class="lineNum">     851 </span>                :<span class="lineCov">          2 :     allocator() _NOEXCEPT _LIBCPP_DEFAULT</span></a>
<a name="852"><span class="lineNum">     852 </span>                :            : </a>
<a name="853"><span class="lineNum">     853 </span>                :            :     template &lt;class _Up&gt;</a>
<a name="854"><span class="lineNum">     854 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="855"><span class="lineNum">     855 </span>                :            :     allocator(const allocator&lt;_Up&gt;&amp;) _NOEXCEPT { }</a>
<a name="856"><span class="lineNum">     856 </span>                :            : </a>
<a name="857"><span class="lineNum">     857 </span>                :            :     _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="858"><span class="lineNum">     858 </span>                :<span class="lineNoCov">          0 :     _Tp* allocate(size_t __n) {</span></a>
<a name="859"><span class="lineNum">     859 </span>                :<span class="lineNoCov">          0 :         if (__n &gt; allocator_traits&lt;allocator&gt;::max_size(*this))</span></a>
<a name="860"><span class="lineNum">     860 </span>                :<span class="lineNoCov">          0 :             __throw_length_error(&quot;allocator&lt;T&gt;::allocate(size_t n)&quot;</span></a>
<a name="861"><span class="lineNum">     861 </span>                :            :                                  &quot; 'n' exceeds maximum supported size&quot;);</a>
<a name="862"><span class="lineNum">     862 </span>                :            :         if (__libcpp_is_constant_evaluated()) {</a>
<a name="863"><span class="lineNum">     863 </span>                :            :             return static_cast&lt;_Tp*&gt;(::operator new(__n * sizeof(_Tp)));</a>
<a name="864"><span class="lineNum">     864 </span>                :            :         } else {</a>
<a name="865"><span class="lineNum">     865 </span>                :<span class="lineNoCov">          0 :             return static_cast&lt;_Tp*&gt;(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));</span></a>
<a name="866"><span class="lineNum">     866 </span>                :            :         }</a>
<a name="867"><span class="lineNum">     867 </span>                :            :     }</a>
<a name="868"><span class="lineNum">     868 </span>                :            : </a>
<a name="869"><span class="lineNum">     869 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="870"><span class="lineNum">     870 </span>                :<span class="lineCov">          3 :     void deallocate(_Tp* __p, size_t __n) _NOEXCEPT {</span></a>
<a name="871"><span class="lineNum">     871 </span>                :            :         if (__libcpp_is_constant_evaluated()) {</a>
<a name="872"><span class="lineNum">     872 </span>                :            :             ::operator delete(__p);</a>
<a name="873"><span class="lineNum">     873 </span>                :            :         } else {</a>
<a name="874"><span class="lineNum">     874 </span>                :<span class="lineCov">          3 :             _VSTD::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));</span></a>
<a name="875"><span class="lineNum">     875 </span>                :            :         }</a>
<a name="876"><span class="lineNum">     876 </span>                :<span class="lineCov">          3 :     }</span></a>
<a name="877"><span class="lineNum">     877 </span>                :            : </a>
<a name="878"><span class="lineNum">     878 </span>                :            :     // C++20 Removed members</a>
<a name="879"><span class="lineNum">     879 </span>                :            : #if _LIBCPP_STD_VER &lt;= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)</a>
<a name="880"><span class="lineNum">     880 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp*       pointer;</a>
<a name="881"><span class="lineNum">     881 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer;</a>
<a name="882"><span class="lineNum">     882 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp&amp;       reference;</a>
<a name="883"><span class="lineNum">     883 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp&amp; const_reference;</a>
<a name="884"><span class="lineNum">     884 </span>                :            : </a>
<a name="885"><span class="lineNum">     885 </span>                :            :     template &lt;class _Up&gt;</a>
<a name="886"><span class="lineNum">     886 </span>                :            :     struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {</a>
<a name="887"><span class="lineNum">     887 </span>                :            :         typedef allocator&lt;_Up&gt; other;</a>
<a name="888"><span class="lineNum">     888 </span>                :            :     };</a>
<a name="889"><span class="lineNum">     889 </span>                :            : </a>
<a name="890"><span class="lineNum">     890 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY</a>
<a name="891"><span class="lineNum">     891 </span>                :            :     pointer address(reference __x) const _NOEXCEPT {</a>
<a name="892"><span class="lineNum">     892 </span>                :            :         return _VSTD::addressof(__x);</a>
<a name="893"><span class="lineNum">     893 </span>                :            :     }</a>
<a name="894"><span class="lineNum">     894 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY</a>
<a name="895"><span class="lineNum">     895 </span>                :            :     const_pointer address(const_reference __x) const _NOEXCEPT {</a>
<a name="896"><span class="lineNum">     896 </span>                :            :         return _VSTD::addressof(__x);</a>
<a name="897"><span class="lineNum">     897 </span>                :            :     }</a>
<a name="898"><span class="lineNum">     898 </span>                :            : </a>
<a name="899"><span class="lineNum">     899 </span>                :            :     _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17</a>
<a name="900"><span class="lineNum">     900 </span>                :            :     _Tp* allocate(size_t __n, const void*) {</a>
<a name="901"><span class="lineNum">     901 </span>                :            :         return allocate(__n);</a>
<a name="902"><span class="lineNum">     902 </span>                :            :     }</a>
<a name="903"><span class="lineNum">     903 </span>                :            : </a>
<a name="904"><span class="lineNum">     904 </span>                :<span class="lineNoCov">          0 :     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT {</span></a>
<a name="905"><span class="lineNum">     905 </span>                :<span class="lineNoCov">          0 :         return size_type(~0) / sizeof(_Tp);</span></a>
<a name="906"><span class="lineNum">     906 </span>                :            :     }</a>
<a name="907"><span class="lineNum">     907 </span>                :            : </a>
<a name="908"><span class="lineNum">     908 </span>                :            :     template &lt;class _Up, class... _Args&gt;</a>
<a name="909"><span class="lineNum">     909 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY</a>
<a name="910"><span class="lineNum">     910 </span>                :            :     void construct(_Up* __p, _Args&amp;&amp;... __args) {</a>
<a name="911"><span class="lineNum">     911 </span>                :            :         ::new ((void*)__p) _Up(_VSTD::forward&lt;_Args&gt;(__args)...);</a>
<a name="912"><span class="lineNum">     912 </span>                :            :     }</a>
<a name="913"><span class="lineNum">     913 </span>                :            : </a>
<a name="914"><span class="lineNum">     914 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY</a>
<a name="915"><span class="lineNum">     915 </span>                :            :     void destroy(pointer __p) {</a>
<a name="916"><span class="lineNum">     916 </span>                :            :         __p-&gt;~_Tp();</a>
<a name="917"><span class="lineNum">     917 </span>                :            :     }</a>
<a name="918"><span class="lineNum">     918 </span>                :            : #endif</a>
<a name="919"><span class="lineNum">     919 </span>                :            : };</a>
<a name="920"><span class="lineNum">     920 </span>                :            : </a>
<a name="921"><span class="lineNum">     921 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="922"><span class="lineNum">     922 </span>                :            : class _LIBCPP_TEMPLATE_VIS allocator&lt;const _Tp&gt;</a>
<a name="923"><span class="lineNum">     923 </span>                :            :     : private __non_trivial_if&lt;!is_void&lt;_Tp&gt;::value, allocator&lt;const _Tp&gt; &gt;</a>
<a name="924"><span class="lineNum">     924 </span>                :            : {</a>
<a name="925"><span class="lineNum">     925 </span>                :            : public:</a>
<a name="926"><span class="lineNum">     926 </span>                :            :     typedef size_t      size_type;</a>
<a name="927"><span class="lineNum">     927 </span>                :            :     typedef ptrdiff_t   difference_type;</a>
<a name="928"><span class="lineNum">     928 </span>                :            :     typedef const _Tp   value_type;</a>
<a name="929"><span class="lineNum">     929 </span>                :            :     typedef true_type   propagate_on_container_move_assignment;</a>
<a name="930"><span class="lineNum">     930 </span>                :            :     typedef true_type   is_always_equal;</a>
<a name="931"><span class="lineNum">     931 </span>                :            : </a>
<a name="932"><span class="lineNum">     932 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="933"><span class="lineNum">     933 </span>                :            :     allocator() _NOEXCEPT _LIBCPP_DEFAULT</a>
<a name="934"><span class="lineNum">     934 </span>                :            : </a>
<a name="935"><span class="lineNum">     935 </span>                :            :     template &lt;class _Up&gt;</a>
<a name="936"><span class="lineNum">     936 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="937"><span class="lineNum">     937 </span>                :            :     allocator(const allocator&lt;_Up&gt;&amp;) _NOEXCEPT { }</a>
<a name="938"><span class="lineNum">     938 </span>                :            : </a>
<a name="939"><span class="lineNum">     939 </span>                :            :     _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="940"><span class="lineNum">     940 </span>                :            :     const _Tp* allocate(size_t __n) {</a>
<a name="941"><span class="lineNum">     941 </span>                :            :         if (__n &gt; allocator_traits&lt;allocator&gt;::max_size(*this))</a>
<a name="942"><span class="lineNum">     942 </span>                :            :             __throw_length_error(&quot;allocator&lt;const T&gt;::allocate(size_t n)&quot;</a>
<a name="943"><span class="lineNum">     943 </span>                :            :                                  &quot; 'n' exceeds maximum supported size&quot;);</a>
<a name="944"><span class="lineNum">     944 </span>                :            :         if (__libcpp_is_constant_evaluated()) {</a>
<a name="945"><span class="lineNum">     945 </span>                :            :             return static_cast&lt;const _Tp*&gt;(::operator new(__n * sizeof(_Tp)));</a>
<a name="946"><span class="lineNum">     946 </span>                :            :         } else {</a>
<a name="947"><span class="lineNum">     947 </span>                :            :             return static_cast&lt;const _Tp*&gt;(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));</a>
<a name="948"><span class="lineNum">     948 </span>                :            :         }</a>
<a name="949"><span class="lineNum">     949 </span>                :            :     }</a>
<a name="950"><span class="lineNum">     950 </span>                :            : </a>
<a name="951"><span class="lineNum">     951 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="952"><span class="lineNum">     952 </span>                :            :     void deallocate(const _Tp* __p, size_t __n) {</a>
<a name="953"><span class="lineNum">     953 </span>                :            :         if (__libcpp_is_constant_evaluated()) {</a>
<a name="954"><span class="lineNum">     954 </span>                :            :             ::operator delete(const_cast&lt;_Tp*&gt;(__p));</a>
<a name="955"><span class="lineNum">     955 </span>                :            :         } else {</a>
<a name="956"><span class="lineNum">     956 </span>                :            :             _VSTD::__libcpp_deallocate((void*) const_cast&lt;_Tp *&gt;(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));</a>
<a name="957"><span class="lineNum">     957 </span>                :            :         }</a>
<a name="958"><span class="lineNum">     958 </span>                :            :     }</a>
<a name="959"><span class="lineNum">     959 </span>                :            : </a>
<a name="960"><span class="lineNum">     960 </span>                :            :     // C++20 Removed members</a>
<a name="961"><span class="lineNum">     961 </span>                :            : #if _LIBCPP_STD_VER &lt;= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)</a>
<a name="962"><span class="lineNum">     962 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* pointer;</a>
<a name="963"><span class="lineNum">     963 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer;</a>
<a name="964"><span class="lineNum">     964 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp&amp; reference;</a>
<a name="965"><span class="lineNum">     965 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp&amp; const_reference;</a>
<a name="966"><span class="lineNum">     966 </span>                :            : </a>
<a name="967"><span class="lineNum">     967 </span>                :            :     template &lt;class _Up&gt;</a>
<a name="968"><span class="lineNum">     968 </span>                :            :     struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {</a>
<a name="969"><span class="lineNum">     969 </span>                :            :         typedef allocator&lt;_Up&gt; other;</a>
<a name="970"><span class="lineNum">     970 </span>                :            :     };</a>
<a name="971"><span class="lineNum">     971 </span>                :            : </a>
<a name="972"><span class="lineNum">     972 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY</a>
<a name="973"><span class="lineNum">     973 </span>                :            :     const_pointer address(const_reference __x) const _NOEXCEPT {</a>
<a name="974"><span class="lineNum">     974 </span>                :            :         return _VSTD::addressof(__x);</a>
<a name="975"><span class="lineNum">     975 </span>                :            :     }</a>
<a name="976"><span class="lineNum">     976 </span>                :            : </a>
<a name="977"><span class="lineNum">     977 </span>                :            :     _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17</a>
<a name="978"><span class="lineNum">     978 </span>                :            :     const _Tp* allocate(size_t __n, const void*) {</a>
<a name="979"><span class="lineNum">     979 </span>                :            :         return allocate(__n);</a>
<a name="980"><span class="lineNum">     980 </span>                :            :     }</a>
<a name="981"><span class="lineNum">     981 </span>                :            : </a>
<a name="982"><span class="lineNum">     982 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT {</a>
<a name="983"><span class="lineNum">     983 </span>                :            :         return size_type(~0) / sizeof(_Tp);</a>
<a name="984"><span class="lineNum">     984 </span>                :            :     }</a>
<a name="985"><span class="lineNum">     985 </span>                :            : </a>
<a name="986"><span class="lineNum">     986 </span>                :            :     template &lt;class _Up, class... _Args&gt;</a>
<a name="987"><span class="lineNum">     987 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY</a>
<a name="988"><span class="lineNum">     988 </span>                :            :     void construct(_Up* __p, _Args&amp;&amp;... __args) {</a>
<a name="989"><span class="lineNum">     989 </span>                :            :         ::new ((void*)__p) _Up(_VSTD::forward&lt;_Args&gt;(__args)...);</a>
<a name="990"><span class="lineNum">     990 </span>                :            :     }</a>
<a name="991"><span class="lineNum">     991 </span>                :            : </a>
<a name="992"><span class="lineNum">     992 </span>                :            :     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY</a>
<a name="993"><span class="lineNum">     993 </span>                :            :     void destroy(pointer __p) {</a>
<a name="994"><span class="lineNum">     994 </span>                :            :         __p-&gt;~_Tp();</a>
<a name="995"><span class="lineNum">     995 </span>                :            :     }</a>
<a name="996"><span class="lineNum">     996 </span>                :            : #endif</a>
<a name="997"><span class="lineNum">     997 </span>                :            : };</a>
<a name="998"><span class="lineNum">     998 </span>                :            : </a>
<a name="999"><span class="lineNum">     999 </span>                :            : template &lt;class _Tp, class _Up&gt;</a>
<a name="1000"><span class="lineNum">    1000 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="1001"><span class="lineNum">    1001 </span>                :            : bool operator==(const allocator&lt;_Tp&gt;&amp;, const allocator&lt;_Up&gt;&amp;) _NOEXCEPT {return true;}</a>
<a name="1002"><span class="lineNum">    1002 </span>                :            : </a>
<a name="1003"><span class="lineNum">    1003 </span>                :            : template &lt;class _Tp, class _Up&gt;</a>
<a name="1004"><span class="lineNum">    1004 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="1005"><span class="lineNum">    1005 </span>                :            : bool operator!=(const allocator&lt;_Tp&gt;&amp;, const allocator&lt;_Up&gt;&amp;) _NOEXCEPT {return false;}</a>
<a name="1006"><span class="lineNum">    1006 </span>                :            : </a>
<a name="1007"><span class="lineNum">    1007 </span>                :            : template &lt;class _Alloc, class _Ptr&gt;</a>
<a name="1008"><span class="lineNum">    1008 </span>                :            : _LIBCPP_INLINE_VISIBILITY</a>
<a name="1009"><span class="lineNum">    1009 </span>                :            : void __construct_forward_with_exception_guarantees(_Alloc&amp; __a, _Ptr __begin1, _Ptr __end1, _Ptr&amp; __begin2) {</a>
<a name="1010"><span class="lineNum">    1010 </span>                :            :     static_assert(__is_cpp17_move_insertable&lt;_Alloc&gt;::value,</a>
<a name="1011"><span class="lineNum">    1011 </span>                :            :         &quot;The specified type does not meet the requirements of Cpp17MoveInsertable&quot;);</a>
<a name="1012"><span class="lineNum">    1012 </span>                :            :     typedef allocator_traits&lt;_Alloc&gt; _Traits;</a>
<a name="1013"><span class="lineNum">    1013 </span>                :            :     for (; __begin1 != __end1; ++__begin1, (void)++__begin2) {</a>
<a name="1014"><span class="lineNum">    1014 </span>                :            :         _Traits::construct(__a, _VSTD::__to_address(__begin2),</a>
<a name="1015"><span class="lineNum">    1015 </span>                :            : #ifdef _LIBCPP_NO_EXCEPTIONS</a>
<a name="1016"><span class="lineNum">    1016 </span>                :            :             _VSTD::move(*__begin1)</a>
<a name="1017"><span class="lineNum">    1017 </span>                :            : #else</a>
<a name="1018"><span class="lineNum">    1018 </span>                :            :             _VSTD::move_if_noexcept(*__begin1)</a>
<a name="1019"><span class="lineNum">    1019 </span>                :            : #endif</a>
<a name="1020"><span class="lineNum">    1020 </span>                :            :         );</a>
<a name="1021"><span class="lineNum">    1021 </span>                :            :     }</a>
<a name="1022"><span class="lineNum">    1022 </span>                :            : }</a>
<a name="1023"><span class="lineNum">    1023 </span>                :            : </a>
<a name="1024"><span class="lineNum">    1024 </span>                :            : template &lt;class _Alloc, class _Tp, typename enable_if&lt;</a>
<a name="1025"><span class="lineNum">    1025 </span>                :            :     (__is_default_allocator&lt;_Alloc&gt;::value || !__has_construct&lt;_Alloc, _Tp*, _Tp&gt;::value) &amp;&amp;</a>
<a name="1026"><span class="lineNum">    1026 </span>                :            :     is_trivially_move_constructible&lt;_Tp&gt;::value</a>
<a name="1027"><span class="lineNum">    1027 </span>                :            : &gt;::type&gt;</a>
<a name="1028"><span class="lineNum">    1028 </span>                :            : _LIBCPP_INLINE_VISIBILITY</a>
<a name="1029"><span class="lineNum">    1029 </span>                :            : void __construct_forward_with_exception_guarantees(_Alloc&amp;, _Tp* __begin1, _Tp* __end1, _Tp*&amp; __begin2) {</a>
<a name="1030"><span class="lineNum">    1030 </span>                :            :     ptrdiff_t _Np = __end1 - __begin1;</a>
<a name="1031"><span class="lineNum">    1031 </span>                :            :     if (_Np &gt; 0) {</a>
<a name="1032"><span class="lineNum">    1032 </span>                :            :         _VSTD::memcpy(__begin2, __begin1, _Np * sizeof(_Tp));</a>
<a name="1033"><span class="lineNum">    1033 </span>                :            :         __begin2 += _Np;</a>
<a name="1034"><span class="lineNum">    1034 </span>                :            :     }</a>
<a name="1035"><span class="lineNum">    1035 </span>                :            : }</a>
<a name="1036"><span class="lineNum">    1036 </span>                :            : </a>
<a name="1037"><span class="lineNum">    1037 </span>                :            : template &lt;class _Alloc, class _Iter, class _Ptr&gt;</a>
<a name="1038"><span class="lineNum">    1038 </span>                :            : _LIBCPP_INLINE_VISIBILITY</a>
<a name="1039"><span class="lineNum">    1039 </span>                :            : void __construct_range_forward(_Alloc&amp; __a, _Iter __begin1, _Iter __end1, _Ptr&amp; __begin2) {</a>
<a name="1040"><span class="lineNum">    1040 </span>                :            :     typedef allocator_traits&lt;_Alloc&gt; _Traits;</a>
<a name="1041"><span class="lineNum">    1041 </span>                :            :     for (; __begin1 != __end1; ++__begin1, (void) ++__begin2) {</a>
<a name="1042"><span class="lineNum">    1042 </span>                :            :         _Traits::construct(__a, _VSTD::__to_address(__begin2), *__begin1);</a>
<a name="1043"><span class="lineNum">    1043 </span>                :            :     }</a>
<a name="1044"><span class="lineNum">    1044 </span>                :            : }</a>
<a name="1045"><span class="lineNum">    1045 </span>                :            : </a>
<a name="1046"><span class="lineNum">    1046 </span>                :            : template &lt;class _Alloc, class _Source, class _Dest,</a>
<a name="1047"><span class="lineNum">    1047 </span>                :            :           class _RawSource = typename remove_const&lt;_Source&gt;::type,</a>
<a name="1048"><span class="lineNum">    1048 </span>                :            :           class _RawDest = typename remove_const&lt;_Dest&gt;::type,</a>
<a name="1049"><span class="lineNum">    1049 </span>                :            :           class =</a>
<a name="1050"><span class="lineNum">    1050 </span>                :            :     typename enable_if&lt;</a>
<a name="1051"><span class="lineNum">    1051 </span>                :            :         is_trivially_copy_constructible&lt;_Dest&gt;::value &amp;&amp;</a>
<a name="1052"><span class="lineNum">    1052 </span>                :            :         is_same&lt;_RawSource, _RawDest&gt;::value &amp;&amp;</a>
<a name="1053"><span class="lineNum">    1053 </span>                :            :         (__is_default_allocator&lt;_Alloc&gt;::value || !__has_construct&lt;_Alloc, _Dest*, _Source&amp;&gt;::value)</a>
<a name="1054"><span class="lineNum">    1054 </span>                :            :     &gt;::type&gt;</a>
<a name="1055"><span class="lineNum">    1055 </span>                :            : _LIBCPP_INLINE_VISIBILITY</a>
<a name="1056"><span class="lineNum">    1056 </span>                :            : void __construct_range_forward(_Alloc&amp;, _Source* __begin1, _Source* __end1, _Dest*&amp; __begin2) {</a>
<a name="1057"><span class="lineNum">    1057 </span>                :            :     ptrdiff_t _Np = __end1 - __begin1;</a>
<a name="1058"><span class="lineNum">    1058 </span>                :            :     if (_Np &gt; 0) {</a>
<a name="1059"><span class="lineNum">    1059 </span>                :            :         _VSTD::memcpy(const_cast&lt;_RawDest*&gt;(__begin2), __begin1, _Np * sizeof(_Dest));</a>
<a name="1060"><span class="lineNum">    1060 </span>                :            :         __begin2 += _Np;</a>
<a name="1061"><span class="lineNum">    1061 </span>                :            :     }</a>
<a name="1062"><span class="lineNum">    1062 </span>                :            : }</a>
<a name="1063"><span class="lineNum">    1063 </span>                :            : </a>
<a name="1064"><span class="lineNum">    1064 </span>                :            : template &lt;class _Alloc, class _Ptr&gt;</a>
<a name="1065"><span class="lineNum">    1065 </span>                :            : _LIBCPP_INLINE_VISIBILITY</a>
<a name="1066"><span class="lineNum">    1066 </span>                :            : void __construct_backward_with_exception_guarantees(_Alloc&amp; __a, _Ptr __begin1, _Ptr __end1, _Ptr&amp; __end2) {</a>
<a name="1067"><span class="lineNum">    1067 </span>                :            :     static_assert(__is_cpp17_move_insertable&lt;_Alloc&gt;::value,</a>
<a name="1068"><span class="lineNum">    1068 </span>                :            :         &quot;The specified type does not meet the requirements of Cpp17MoveInsertable&quot;);</a>
<a name="1069"><span class="lineNum">    1069 </span>                :            :     typedef allocator_traits&lt;_Alloc&gt; _Traits;</a>
<a name="1070"><span class="lineNum">    1070 </span>                :            :     while (__end1 != __begin1) {</a>
<a name="1071"><span class="lineNum">    1071 </span>                :            :         _Traits::construct(__a, _VSTD::__to_address(__end2 - 1),</a>
<a name="1072"><span class="lineNum">    1072 </span>                :            : #ifdef _LIBCPP_NO_EXCEPTIONS</a>
<a name="1073"><span class="lineNum">    1073 </span>                :            :             _VSTD::move(*--__end1)</a>
<a name="1074"><span class="lineNum">    1074 </span>                :            : #else</a>
<a name="1075"><span class="lineNum">    1075 </span>                :            :             _VSTD::move_if_noexcept(*--__end1)</a>
<a name="1076"><span class="lineNum">    1076 </span>                :            : #endif</a>
<a name="1077"><span class="lineNum">    1077 </span>                :            :         );</a>
<a name="1078"><span class="lineNum">    1078 </span>                :            :         --__end2;</a>
<a name="1079"><span class="lineNum">    1079 </span>                :            :     }</a>
<a name="1080"><span class="lineNum">    1080 </span>                :            : }</a>
<a name="1081"><span class="lineNum">    1081 </span>                :            : </a>
<a name="1082"><span class="lineNum">    1082 </span>                :            : template &lt;class _Alloc, class _Tp, class = typename enable_if&lt;</a>
<a name="1083"><span class="lineNum">    1083 </span>                :            :     (__is_default_allocator&lt;_Alloc&gt;::value || !__has_construct&lt;_Alloc, _Tp*, _Tp&gt;::value) &amp;&amp;</a>
<a name="1084"><span class="lineNum">    1084 </span>                :            :     is_trivially_move_constructible&lt;_Tp&gt;::value</a>
<a name="1085"><span class="lineNum">    1085 </span>                :            : &gt;::type&gt;</a>
<a name="1086"><span class="lineNum">    1086 </span>                :            : _LIBCPP_INLINE_VISIBILITY</a>
<a name="1087"><span class="lineNum">    1087 </span>                :            : void __construct_backward_with_exception_guarantees(_Alloc&amp;, _Tp* __begin1, _Tp* __end1, _Tp*&amp; __end2) {</a>
<a name="1088"><span class="lineNum">    1088 </span>                :            :     ptrdiff_t _Np = __end1 - __begin1;</a>
<a name="1089"><span class="lineNum">    1089 </span>                :            :     __end2 -= _Np;</a>
<a name="1090"><span class="lineNum">    1090 </span>                :            :     if (_Np &gt; 0)</a>
<a name="1091"><span class="lineNum">    1091 </span>                :            :         _VSTD::memcpy(__end2, __begin1, _Np * sizeof(_Tp));</a>
<a name="1092"><span class="lineNum">    1092 </span>                :            : }</a>
<a name="1093"><span class="lineNum">    1093 </span>                :            : </a>
<a name="1094"><span class="lineNum">    1094 </span>                :            : template &lt;class _OutputIterator, class _Tp&gt;</a>
<a name="1095"><span class="lineNum">    1095 </span>                :            : class _LIBCPP_TEMPLATE_VIS raw_storage_iterator</a>
<a name="1096"><span class="lineNum">    1096 </span>                :            :     : public iterator&lt;output_iterator_tag,</a>
<a name="1097"><span class="lineNum">    1097 </span>                :            :                       _Tp,                                         // purposefully not C++03</a>
<a name="1098"><span class="lineNum">    1098 </span>                :            :                       ptrdiff_t,                                   // purposefully not C++03</a>
<a name="1099"><span class="lineNum">    1099 </span>                :            :                       _Tp*,                                        // purposefully not C++03</a>
<a name="1100"><span class="lineNum">    1100 </span>                :            :                       raw_storage_iterator&lt;_OutputIterator, _Tp&gt;&amp;&gt; // purposefully not C++03</a>
<a name="1101"><span class="lineNum">    1101 </span>                :            : {</a>
<a name="1102"><span class="lineNum">    1102 </span>                :            : private:</a>
<a name="1103"><span class="lineNum">    1103 </span>                :            :     _OutputIterator __x_;</a>
<a name="1104"><span class="lineNum">    1104 </span>                :            : public:</a>
<a name="1105"><span class="lineNum">    1105 </span>                :            :     _LIBCPP_INLINE_VISIBILITY explicit raw_storage_iterator(_OutputIterator __x) : __x_(__x) {}</a>
<a name="1106"><span class="lineNum">    1106 </span>                :            :     _LIBCPP_INLINE_VISIBILITY raw_storage_iterator&amp; operator*() {return *this;}</a>
<a name="1107"><span class="lineNum">    1107 </span>                :            :     _LIBCPP_INLINE_VISIBILITY raw_storage_iterator&amp; operator=(const _Tp&amp; __element)</a>
<a name="1108"><span class="lineNum">    1108 </span>                :            :         {::new ((void*)_VSTD::addressof(*__x_)) _Tp(__element); return *this;}</a>
<a name="1109"><span class="lineNum">    1109 </span>                :            : #if _LIBCPP_STD_VER &gt;= 14</a>
<a name="1110"><span class="lineNum">    1110 </span>                :            :     _LIBCPP_INLINE_VISIBILITY raw_storage_iterator&amp; operator=(_Tp&amp;&amp; __element)</a>
<a name="1111"><span class="lineNum">    1111 </span>                :            :         {::new ((void*)_VSTD::addressof(*__x_)) _Tp(_VSTD::move(__element)); return *this;}</a>
<a name="1112"><span class="lineNum">    1112 </span>                :            : #endif</a>
<a name="1113"><span class="lineNum">    1113 </span>                :            :     _LIBCPP_INLINE_VISIBILITY raw_storage_iterator&amp; operator++() {++__x_; return *this;}</a>
<a name="1114"><span class="lineNum">    1114 </span>                :            :     _LIBCPP_INLINE_VISIBILITY raw_storage_iterator  operator++(int)</a>
<a name="1115"><span class="lineNum">    1115 </span>                :            :         {raw_storage_iterator __t(*this); ++__x_; return __t;}</a>
<a name="1116"><span class="lineNum">    1116 </span>                :            : #if _LIBCPP_STD_VER &gt;= 14</a>
<a name="1117"><span class="lineNum">    1117 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _OutputIterator base() const { return __x_; }</a>
<a name="1118"><span class="lineNum">    1118 </span>                :            : #endif</a>
<a name="1119"><span class="lineNum">    1119 </span>                :            : };</a>
<a name="1120"><span class="lineNum">    1120 </span>                :            : </a>
<a name="1121"><span class="lineNum">    1121 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="1122"><span class="lineNum">    1122 </span>                :            : _LIBCPP_NODISCARD_EXT _LIBCPP_NO_CFI</a>
<a name="1123"><span class="lineNum">    1123 </span>                :            : pair&lt;_Tp*, ptrdiff_t&gt;</a>
<a name="1124"><span class="lineNum">    1124 </span>                :            : get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT</a>
<a name="1125"><span class="lineNum">    1125 </span>                :            : {</a>
<a name="1126"><span class="lineNum">    1126 </span>                :            :     pair&lt;_Tp*, ptrdiff_t&gt; __r(0, 0);</a>
<a name="1127"><span class="lineNum">    1127 </span>                :            :     const ptrdiff_t __m = (~ptrdiff_t(0) ^</a>
<a name="1128"><span class="lineNum">    1128 </span>                :            :                            ptrdiff_t(ptrdiff_t(1) &lt;&lt; (sizeof(ptrdiff_t) * __CHAR_BIT__ - 1)))</a>
<a name="1129"><span class="lineNum">    1129 </span>                :            :                            / sizeof(_Tp);</a>
<a name="1130"><span class="lineNum">    1130 </span>                :            :     if (__n &gt; __m)</a>
<a name="1131"><span class="lineNum">    1131 </span>                :            :         __n = __m;</a>
<a name="1132"><span class="lineNum">    1132 </span>                :            :     while (__n &gt; 0)</a>
<a name="1133"><span class="lineNum">    1133 </span>                :            :     {</a>
<a name="1134"><span class="lineNum">    1134 </span>                :            : #if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)</a>
<a name="1135"><span class="lineNum">    1135 </span>                :            :     if (__is_overaligned_for_new(_LIBCPP_ALIGNOF(_Tp)))</a>
<a name="1136"><span class="lineNum">    1136 </span>                :            :         {</a>
<a name="1137"><span class="lineNum">    1137 </span>                :            :             align_val_t __al =</a>
<a name="1138"><span class="lineNum">    1138 </span>                :            :                 align_val_t(alignment_of&lt;_Tp&gt;::value);</a>
<a name="1139"><span class="lineNum">    1139 </span>                :            :             __r.first = static_cast&lt;_Tp*&gt;(::operator new(</a>
<a name="1140"><span class="lineNum">    1140 </span>                :            :                 __n * sizeof(_Tp), __al, nothrow));</a>
<a name="1141"><span class="lineNum">    1141 </span>                :            :         } else {</a>
<a name="1142"><span class="lineNum">    1142 </span>                :            :             __r.first = static_cast&lt;_Tp*&gt;(::operator new(</a>
<a name="1143"><span class="lineNum">    1143 </span>                :            :                 __n * sizeof(_Tp), nothrow));</a>
<a name="1144"><span class="lineNum">    1144 </span>                :            :         }</a>
<a name="1145"><span class="lineNum">    1145 </span>                :            : #else</a>
<a name="1146"><span class="lineNum">    1146 </span>                :            :     if (__is_overaligned_for_new(_LIBCPP_ALIGNOF(_Tp)))</a>
<a name="1147"><span class="lineNum">    1147 </span>                :            :         {</a>
<a name="1148"><span class="lineNum">    1148 </span>                :            :             // Since aligned operator new is unavailable, return an empty</a>
<a name="1149"><span class="lineNum">    1149 </span>                :            :             // buffer rather than one with invalid alignment.</a>
<a name="1150"><span class="lineNum">    1150 </span>                :            :             return __r;</a>
<a name="1151"><span class="lineNum">    1151 </span>                :            :         }</a>
<a name="1152"><span class="lineNum">    1152 </span>                :            : </a>
<a name="1153"><span class="lineNum">    1153 </span>                :            :         __r.first = static_cast&lt;_Tp*&gt;(::operator new(__n * sizeof(_Tp), nothrow));</a>
<a name="1154"><span class="lineNum">    1154 </span>                :            : #endif</a>
<a name="1155"><span class="lineNum">    1155 </span>                :            : </a>
<a name="1156"><span class="lineNum">    1156 </span>                :            :         if (__r.first)</a>
<a name="1157"><span class="lineNum">    1157 </span>                :            :         {</a>
<a name="1158"><span class="lineNum">    1158 </span>                :            :             __r.second = __n;</a>
<a name="1159"><span class="lineNum">    1159 </span>                :            :             break;</a>
<a name="1160"><span class="lineNum">    1160 </span>                :            :         }</a>
<a name="1161"><span class="lineNum">    1161 </span>                :            :         __n /= 2;</a>
<a name="1162"><span class="lineNum">    1162 </span>                :            :     }</a>
<a name="1163"><span class="lineNum">    1163 </span>                :            :     return __r;</a>
<a name="1164"><span class="lineNum">    1164 </span>                :            : }</a>
<a name="1165"><span class="lineNum">    1165 </span>                :            : </a>
<a name="1166"><span class="lineNum">    1166 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="1167"><span class="lineNum">    1167 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1168"><span class="lineNum">    1168 </span>                :            : void return_temporary_buffer(_Tp* __p) _NOEXCEPT</a>
<a name="1169"><span class="lineNum">    1169 </span>                :            : {</a>
<a name="1170"><span class="lineNum">    1170 </span>                :            :   _VSTD::__libcpp_deallocate_unsized((void*)__p, _LIBCPP_ALIGNOF(_Tp));</a>
<a name="1171"><span class="lineNum">    1171 </span>                :            : }</a>
<a name="1172"><span class="lineNum">    1172 </span>                :            : </a>
<a name="1173"><span class="lineNum">    1173 </span>                :            : #if _LIBCPP_STD_VER &lt;= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)</a>
<a name="1174"><span class="lineNum">    1174 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="1175"><span class="lineNum">    1175 </span>                :            : struct _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr_ref</a>
<a name="1176"><span class="lineNum">    1176 </span>                :            : {</a>
<a name="1177"><span class="lineNum">    1177 </span>                :            :     _Tp* __ptr_;</a>
<a name="1178"><span class="lineNum">    1178 </span>                :            : };</a>
<a name="1179"><span class="lineNum">    1179 </span>                :            : </a>
<a name="1180"><span class="lineNum">    1180 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="1181"><span class="lineNum">    1181 </span>                :            : class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr</a>
<a name="1182"><span class="lineNum">    1182 </span>                :            : {</a>
<a name="1183"><span class="lineNum">    1183 </span>                :            : private:</a>
<a name="1184"><span class="lineNum">    1184 </span>                :            :     _Tp* __ptr_;</a>
<a name="1185"><span class="lineNum">    1185 </span>                :            : public:</a>
<a name="1186"><span class="lineNum">    1186 </span>                :            :     typedef _Tp element_type;</a>
<a name="1187"><span class="lineNum">    1187 </span>                :            : </a>
<a name="1188"><span class="lineNum">    1188 </span>                :            :     _LIBCPP_INLINE_VISIBILITY explicit auto_ptr(_Tp* __p = 0) _NOEXCEPT : __ptr_(__p) {}</a>
<a name="1189"><span class="lineNum">    1189 </span>                :            :     _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr&amp; __p) _NOEXCEPT : __ptr_(__p.release()) {}</a>
<a name="1190"><span class="lineNum">    1190 </span>                :            :     template&lt;class _Up&gt; _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr&lt;_Up&gt;&amp; __p) _NOEXCEPT</a>
<a name="1191"><span class="lineNum">    1191 </span>                :            :         : __ptr_(__p.release()) {}</a>
<a name="1192"><span class="lineNum">    1192 </span>                :            :     _LIBCPP_INLINE_VISIBILITY auto_ptr&amp; operator=(auto_ptr&amp; __p) _NOEXCEPT</a>
<a name="1193"><span class="lineNum">    1193 </span>                :            :         {reset(__p.release()); return *this;}</a>
<a name="1194"><span class="lineNum">    1194 </span>                :            :     template&lt;class _Up&gt; _LIBCPP_INLINE_VISIBILITY auto_ptr&amp; operator=(auto_ptr&lt;_Up&gt;&amp; __p) _NOEXCEPT</a>
<a name="1195"><span class="lineNum">    1195 </span>                :            :         {reset(__p.release()); return *this;}</a>
<a name="1196"><span class="lineNum">    1196 </span>                :            :     _LIBCPP_INLINE_VISIBILITY auto_ptr&amp; operator=(auto_ptr_ref&lt;_Tp&gt; __p) _NOEXCEPT</a>
<a name="1197"><span class="lineNum">    1197 </span>                :            :         {reset(__p.__ptr_); return *this;}</a>
<a name="1198"><span class="lineNum">    1198 </span>                :            :     _LIBCPP_INLINE_VISIBILITY ~auto_ptr() _NOEXCEPT {delete __ptr_;}</a>
<a name="1199"><span class="lineNum">    1199 </span>                :            : </a>
<a name="1200"><span class="lineNum">    1200 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _Tp&amp; operator*() const _NOEXCEPT</a>
<a name="1201"><span class="lineNum">    1201 </span>                :            :         {return *__ptr_;}</a>
<a name="1202"><span class="lineNum">    1202 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _Tp* operator-&gt;() const _NOEXCEPT {return __ptr_;}</a>
<a name="1203"><span class="lineNum">    1203 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _Tp* get() const _NOEXCEPT {return __ptr_;}</a>
<a name="1204"><span class="lineNum">    1204 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _Tp* release() _NOEXCEPT</a>
<a name="1205"><span class="lineNum">    1205 </span>                :            :     {</a>
<a name="1206"><span class="lineNum">    1206 </span>                :            :         _Tp* __t = __ptr_;</a>
<a name="1207"><span class="lineNum">    1207 </span>                :            :         __ptr_ = nullptr;</a>
<a name="1208"><span class="lineNum">    1208 </span>                :            :         return __t;</a>
<a name="1209"><span class="lineNum">    1209 </span>                :            :     }</a>
<a name="1210"><span class="lineNum">    1210 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void reset(_Tp* __p = 0) _NOEXCEPT</a>
<a name="1211"><span class="lineNum">    1211 </span>                :            :     {</a>
<a name="1212"><span class="lineNum">    1212 </span>                :            :         if (__ptr_ != __p)</a>
<a name="1213"><span class="lineNum">    1213 </span>                :            :             delete __ptr_;</a>
<a name="1214"><span class="lineNum">    1214 </span>                :            :         __ptr_ = __p;</a>
<a name="1215"><span class="lineNum">    1215 </span>                :            :     }</a>
<a name="1216"><span class="lineNum">    1216 </span>                :            : </a>
<a name="1217"><span class="lineNum">    1217 </span>                :            :     _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr_ref&lt;_Tp&gt; __p) _NOEXCEPT : __ptr_(__p.__ptr_) {}</a>
<a name="1218"><span class="lineNum">    1218 </span>                :            :     template&lt;class _Up&gt; _LIBCPP_INLINE_VISIBILITY operator auto_ptr_ref&lt;_Up&gt;() _NOEXCEPT</a>
<a name="1219"><span class="lineNum">    1219 </span>                :            :         {auto_ptr_ref&lt;_Up&gt; __t; __t.__ptr_ = release(); return __t;}</a>
<a name="1220"><span class="lineNum">    1220 </span>                :            :     template&lt;class _Up&gt; _LIBCPP_INLINE_VISIBILITY operator auto_ptr&lt;_Up&gt;() _NOEXCEPT</a>
<a name="1221"><span class="lineNum">    1221 </span>                :            :         {return auto_ptr&lt;_Up&gt;(release());}</a>
<a name="1222"><span class="lineNum">    1222 </span>                :            : };</a>
<a name="1223"><span class="lineNum">    1223 </span>                :            : </a>
<a name="1224"><span class="lineNum">    1224 </span>                :            : template &lt;&gt;</a>
<a name="1225"><span class="lineNum">    1225 </span>                :            : class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr&lt;void&gt;</a>
<a name="1226"><span class="lineNum">    1226 </span>                :            : {</a>
<a name="1227"><span class="lineNum">    1227 </span>                :            : public:</a>
<a name="1228"><span class="lineNum">    1228 </span>                :            :     typedef void element_type;</a>
<a name="1229"><span class="lineNum">    1229 </span>                :            : };</a>
<a name="1230"><span class="lineNum">    1230 </span>                :            : #endif</a>
<a name="1231"><span class="lineNum">    1231 </span>                :            : </a>
<a name="1232"><span class="lineNum">    1232 </span>                :            : // Tag used to default initialize one or both of the pair's elements.</a>
<a name="1233"><span class="lineNum">    1233 </span>                :            : struct __default_init_tag {};</a>
<a name="1234"><span class="lineNum">    1234 </span>                :            : struct __value_init_tag {};</a>
<a name="1235"><span class="lineNum">    1235 </span>                :            : </a>
<a name="1236"><span class="lineNum">    1236 </span>                :            : template &lt;class _Tp, int _Idx,</a>
<a name="1237"><span class="lineNum">    1237 </span>                :            :           bool _CanBeEmptyBase =</a>
<a name="1238"><span class="lineNum">    1238 </span>                :            :               is_empty&lt;_Tp&gt;::value &amp;&amp; !__libcpp_is_final&lt;_Tp&gt;::value&gt;</a>
<a name="1239"><span class="lineNum">    1239 </span>                :            : struct __compressed_pair_elem {</a>
<a name="1240"><span class="lineNum">    1240 </span>                :            :   typedef _Tp _ParamT;</a>
<a name="1241"><span class="lineNum">    1241 </span>                :            :   typedef _Tp&amp; reference;</a>
<a name="1242"><span class="lineNum">    1242 </span>                :            :   typedef const _Tp&amp; const_reference;</a>
<a name="1243"><span class="lineNum">    1243 </span>                :            : </a>
<a name="1244"><span class="lineNum">    1244 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR</a>
<a name="1245"><span class="lineNum">    1245 </span>                :<span class="lineCov">          2 :   __compressed_pair_elem(__default_init_tag) {}</span></a>
<a name="1246"><span class="lineNum">    1246 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR</a>
<a name="1247"><span class="lineNum">    1247 </span>                :            :   __compressed_pair_elem(__value_init_tag) : __value_() {}</a>
<a name="1248"><span class="lineNum">    1248 </span>                :            : </a>
<a name="1249"><span class="lineNum">    1249 </span>                :            :   template &lt;class _Up, class = typename enable_if&lt;</a>
<a name="1250"><span class="lineNum">    1250 </span>                :            :       !is_same&lt;__compressed_pair_elem, typename decay&lt;_Up&gt;::type&gt;::value</a>
<a name="1251"><span class="lineNum">    1251 </span>                :            :   &gt;::type&gt;</a>
<a name="1252"><span class="lineNum">    1252 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1253"><span class="lineNum">    1253 </span>                :            :   _LIBCPP_CONSTEXPR explicit</a>
<a name="1254"><span class="lineNum">    1254 </span>                :            :   __compressed_pair_elem(_Up&amp;&amp; __u)</a>
<a name="1255"><span class="lineNum">    1255 </span>                :            :       : __value_(_VSTD::forward&lt;_Up&gt;(__u))</a>
<a name="1256"><span class="lineNum">    1256 </span>                :            :     {</a>
<a name="1257"><span class="lineNum">    1257 </span>                :            :     }</a>
<a name="1258"><span class="lineNum">    1258 </span>                :            : </a>
<a name="1259"><span class="lineNum">    1259 </span>                :            : </a>
<a name="1260"><span class="lineNum">    1260 </span>                :            : #ifndef _LIBCPP_CXX03_LANG</a>
<a name="1261"><span class="lineNum">    1261 </span>                :            :   template &lt;class... _Args, size_t... _Indexes&gt;</a>
<a name="1262"><span class="lineNum">    1262 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14</a>
<a name="1263"><span class="lineNum">    1263 </span>                :            :   __compressed_pair_elem(piecewise_construct_t, tuple&lt;_Args...&gt; __args,</a>
<a name="1264"><span class="lineNum">    1264 </span>                :            :                          __tuple_indices&lt;_Indexes...&gt;)</a>
<a name="1265"><span class="lineNum">    1265 </span>                :            :       : __value_(_VSTD::forward&lt;_Args&gt;(_VSTD::get&lt;_Indexes&gt;(__args))...) {}</a>
<a name="1266"><span class="lineNum">    1266 </span>                :            : #endif</a>
<a name="1267"><span class="lineNum">    1267 </span>                :            : </a>
<a name="1268"><span class="lineNum">    1268 </span>                :            : </a>
<a name="1269"><span class="lineNum">    1269 </span>                :<span class="lineCov">          3 :   _LIBCPP_INLINE_VISIBILITY reference __get() _NOEXCEPT { return __value_; }</span></a>
<a name="1270"><span class="lineNum">    1270 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1271"><span class="lineNum">    1271 </span>                :<span class="lineCov">         14 :   const_reference __get() const _NOEXCEPT { return __value_; }</span></a>
<a name="1272"><span class="lineNum">    1272 </span>                :            : </a>
<a name="1273"><span class="lineNum">    1273 </span>                :            : private:</a>
<a name="1274"><span class="lineNum">    1274 </span>                :            :   _Tp __value_;</a>
<a name="1275"><span class="lineNum">    1275 </span>                :            : };</a>
<a name="1276"><span class="lineNum">    1276 </span>                :            : </a>
<a name="1277"><span class="lineNum">    1277 </span>                :            : template &lt;class _Tp, int _Idx&gt;</a>
<a name="1278"><span class="lineNum">    1278 </span>                :            : struct __compressed_pair_elem&lt;_Tp, _Idx, true&gt; : private _Tp {</a>
<a name="1279"><span class="lineNum">    1279 </span>                :            :   typedef _Tp _ParamT;</a>
<a name="1280"><span class="lineNum">    1280 </span>                :            :   typedef _Tp&amp; reference;</a>
<a name="1281"><span class="lineNum">    1281 </span>                :            :   typedef const _Tp&amp; const_reference;</a>
<a name="1282"><span class="lineNum">    1282 </span>                :            :   typedef _Tp __value_type;</a>
<a name="1283"><span class="lineNum">    1283 </span>                :            : </a>
<a name="1284"><span class="lineNum">    1284 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __compressed_pair_elem() = default;</a>
<a name="1285"><span class="lineNum">    1285 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR</a>
<a name="1286"><span class="lineNum">    1286 </span>                :<span class="lineCov">          2 :   __compressed_pair_elem(__default_init_tag) {}</span></a>
<a name="1287"><span class="lineNum">    1287 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR</a>
<a name="1288"><span class="lineNum">    1288 </span>                :            :   __compressed_pair_elem(__value_init_tag) : __value_type() {}</a>
<a name="1289"><span class="lineNum">    1289 </span>                :            : </a>
<a name="1290"><span class="lineNum">    1290 </span>                :            :   template &lt;class _Up, class = typename enable_if&lt;</a>
<a name="1291"><span class="lineNum">    1291 </span>                :            :         !is_same&lt;__compressed_pair_elem, typename decay&lt;_Up&gt;::type&gt;::value</a>
<a name="1292"><span class="lineNum">    1292 </span>                :            :   &gt;::type&gt;</a>
<a name="1293"><span class="lineNum">    1293 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1294"><span class="lineNum">    1294 </span>                :            :   _LIBCPP_CONSTEXPR explicit</a>
<a name="1295"><span class="lineNum">    1295 </span>                :            :   __compressed_pair_elem(_Up&amp;&amp; __u)</a>
<a name="1296"><span class="lineNum">    1296 </span>                :            :       : __value_type(_VSTD::forward&lt;_Up&gt;(__u))</a>
<a name="1297"><span class="lineNum">    1297 </span>                :            :   {}</a>
<a name="1298"><span class="lineNum">    1298 </span>                :            : </a>
<a name="1299"><span class="lineNum">    1299 </span>                :            : #ifndef _LIBCPP_CXX03_LANG</a>
<a name="1300"><span class="lineNum">    1300 </span>                :            :   template &lt;class... _Args, size_t... _Indexes&gt;</a>
<a name="1301"><span class="lineNum">    1301 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14</a>
<a name="1302"><span class="lineNum">    1302 </span>                :            :   __compressed_pair_elem(piecewise_construct_t, tuple&lt;_Args...&gt; __args,</a>
<a name="1303"><span class="lineNum">    1303 </span>                :            :                          __tuple_indices&lt;_Indexes...&gt;)</a>
<a name="1304"><span class="lineNum">    1304 </span>                :            :       : __value_type(_VSTD::forward&lt;_Args&gt;(_VSTD::get&lt;_Indexes&gt;(__args))...) {}</a>
<a name="1305"><span class="lineNum">    1305 </span>                :            : #endif</a>
<a name="1306"><span class="lineNum">    1306 </span>                :            : </a>
<a name="1307"><span class="lineNum">    1307 </span>                :<span class="lineCov">          3 :   _LIBCPP_INLINE_VISIBILITY reference __get() _NOEXCEPT { return *this; }</span></a>
<a name="1308"><span class="lineNum">    1308 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1309"><span class="lineNum">    1309 </span>                :<span class="lineCov">          1 :   const_reference __get() const _NOEXCEPT { return *this; }</span></a>
<a name="1310"><span class="lineNum">    1310 </span>                :            : };</a>
<a name="1311"><span class="lineNum">    1311 </span>                :            : </a>
<a name="1312"><span class="lineNum">    1312 </span>                :            : template &lt;class _T1, class _T2&gt;</a>
<a name="1313"><span class="lineNum">    1313 </span>                :            : class __compressed_pair : private __compressed_pair_elem&lt;_T1, 0&gt;,</a>
<a name="1314"><span class="lineNum">    1314 </span>                :            :                           private __compressed_pair_elem&lt;_T2, 1&gt; {</a>
<a name="1315"><span class="lineNum">    1315 </span>                :            : public:</a>
<a name="1316"><span class="lineNum">    1316 </span>                :            :   // NOTE: This static assert should never fire because __compressed_pair</a>
<a name="1317"><span class="lineNum">    1317 </span>                :            :   // is *almost never* used in a scenario where it's possible for T1 == T2.</a>
<a name="1318"><span class="lineNum">    1318 </span>                :            :   // (The exception is std::function where it is possible that the function</a>
<a name="1319"><span class="lineNum">    1319 </span>                :            :   //  object and the allocator have the same type).</a>
<a name="1320"><span class="lineNum">    1320 </span>                :            :   static_assert((!is_same&lt;_T1, _T2&gt;::value),</a>
<a name="1321"><span class="lineNum">    1321 </span>                :            :     &quot;__compressed_pair cannot be instantiated when T1 and T2 are the same type; &quot;</a>
<a name="1322"><span class="lineNum">    1322 </span>                :            :     &quot;The current implementation is NOT ABI-compatible with the previous &quot;</a>
<a name="1323"><span class="lineNum">    1323 </span>                :            :     &quot;implementation for this configuration&quot;);</a>
<a name="1324"><span class="lineNum">    1324 </span>                :            : </a>
<a name="1325"><span class="lineNum">    1325 </span>                :            :     typedef _LIBCPP_NODEBUG_TYPE __compressed_pair_elem&lt;_T1, 0&gt; _Base1;</a>
<a name="1326"><span class="lineNum">    1326 </span>                :            :     typedef _LIBCPP_NODEBUG_TYPE __compressed_pair_elem&lt;_T2, 1&gt; _Base2;</a>
<a name="1327"><span class="lineNum">    1327 </span>                :            : </a>
<a name="1328"><span class="lineNum">    1328 </span>                :            :     template &lt;bool _Dummy = true,</a>
<a name="1329"><span class="lineNum">    1329 </span>                :            :       class = typename enable_if&lt;</a>
<a name="1330"><span class="lineNum">    1330 </span>                :            :           __dependent_type&lt;is_default_constructible&lt;_T1&gt;, _Dummy&gt;::value &amp;&amp;</a>
<a name="1331"><span class="lineNum">    1331 </span>                :            :           __dependent_type&lt;is_default_constructible&lt;_T2&gt;, _Dummy&gt;::value</a>
<a name="1332"><span class="lineNum">    1332 </span>                :            :       &gt;::type</a>
<a name="1333"><span class="lineNum">    1333 </span>                :            :   &gt;</a>
<a name="1334"><span class="lineNum">    1334 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1335"><span class="lineNum">    1335 </span>                :            :   _LIBCPP_CONSTEXPR __compressed_pair() : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {}</a>
<a name="1336"><span class="lineNum">    1336 </span>                :            : </a>
<a name="1337"><span class="lineNum">    1337 </span>                :            :   template &lt;class _U1, class _U2&gt;</a>
<a name="1338"><span class="lineNum">    1338 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR</a>
<a name="1339"><span class="lineNum">    1339 </span>                :<span class="lineCov">          2 :   __compressed_pair(_U1&amp;&amp; __t1, _U2&amp;&amp; __t2)</span></a>
<a name="1340"><span class="lineNum">    1340 </span>                :<span class="lineCov">          2 :       : _Base1(_VSTD::forward&lt;_U1&gt;(__t1)), _Base2(_VSTD::forward&lt;_U2&gt;(__t2)) {}</span></a>
<a name="1341"><span class="lineNum">    1341 </span>                :            : </a>
<a name="1342"><span class="lineNum">    1342 </span>                :            : #ifndef _LIBCPP_CXX03_LANG</a>
<a name="1343"><span class="lineNum">    1343 </span>                :            :   template &lt;class... _Args1, class... _Args2&gt;</a>
<a name="1344"><span class="lineNum">    1344 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14</a>
<a name="1345"><span class="lineNum">    1345 </span>                :            :   __compressed_pair(piecewise_construct_t __pc, tuple&lt;_Args1...&gt; __first_args,</a>
<a name="1346"><span class="lineNum">    1346 </span>                :            :                     tuple&lt;_Args2...&gt; __second_args)</a>
<a name="1347"><span class="lineNum">    1347 </span>                :            :       : _Base1(__pc, _VSTD::move(__first_args),</a>
<a name="1348"><span class="lineNum">    1348 </span>                :            :                typename __make_tuple_indices&lt;sizeof...(_Args1)&gt;::type()),</a>
<a name="1349"><span class="lineNum">    1349 </span>                :            :         _Base2(__pc, _VSTD::move(__second_args),</a>
<a name="1350"><span class="lineNum">    1350 </span>                :            :                typename __make_tuple_indices&lt;sizeof...(_Args2)&gt;::type()) {}</a>
<a name="1351"><span class="lineNum">    1351 </span>                :            : #endif</a>
<a name="1352"><span class="lineNum">    1352 </span>                :            : </a>
<a name="1353"><span class="lineNum">    1353 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1354"><span class="lineNum">    1354 </span>                :<span class="lineCov">          3 :   typename _Base1::reference first() _NOEXCEPT {</span></a>
<a name="1355"><span class="lineNum">    1355 </span>                :<span class="lineCov">          3 :     return static_cast&lt;_Base1&amp;&gt;(*this).__get();</span></a>
<a name="1356"><span class="lineNum">    1356 </span>                :            :   }</a>
<a name="1357"><span class="lineNum">    1357 </span>                :            : </a>
<a name="1358"><span class="lineNum">    1358 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1359"><span class="lineNum">    1359 </span>                :<span class="lineCov">         14 :   typename _Base1::const_reference first() const _NOEXCEPT {</span></a>
<a name="1360"><span class="lineNum">    1360 </span>                :<span class="lineCov">         14 :     return static_cast&lt;_Base1 const&amp;&gt;(*this).__get();</span></a>
<a name="1361"><span class="lineNum">    1361 </span>                :            :   }</a>
<a name="1362"><span class="lineNum">    1362 </span>                :            : </a>
<a name="1363"><span class="lineNum">    1363 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1364"><span class="lineNum">    1364 </span>                :<span class="lineCov">          3 :   typename _Base2::reference second() _NOEXCEPT {</span></a>
<a name="1365"><span class="lineNum">    1365 </span>                :<span class="lineCov">          3 :     return static_cast&lt;_Base2&amp;&gt;(*this).__get();</span></a>
<a name="1366"><span class="lineNum">    1366 </span>                :            :   }</a>
<a name="1367"><span class="lineNum">    1367 </span>                :            : </a>
<a name="1368"><span class="lineNum">    1368 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1369"><span class="lineNum">    1369 </span>                :<span class="lineCov">          1 :   typename _Base2::const_reference second() const _NOEXCEPT {</span></a>
<a name="1370"><span class="lineNum">    1370 </span>                :<span class="lineCov">          1 :     return static_cast&lt;_Base2 const&amp;&gt;(*this).__get();</span></a>
<a name="1371"><span class="lineNum">    1371 </span>                :            :   }</a>
<a name="1372"><span class="lineNum">    1372 </span>                :            : </a>
<a name="1373"><span class="lineNum">    1373 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR</a>
<a name="1374"><span class="lineNum">    1374 </span>                :            :   static _Base1* __get_first_base(__compressed_pair* __pair) _NOEXCEPT {</a>
<a name="1375"><span class="lineNum">    1375 </span>                :            :     return static_cast&lt;_Base1*&gt;(__pair);</a>
<a name="1376"><span class="lineNum">    1376 </span>                :            :   }</a>
<a name="1377"><span class="lineNum">    1377 </span>                :            :   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR</a>
<a name="1378"><span class="lineNum">    1378 </span>                :            :   static _Base2* __get_second_base(__compressed_pair* __pair) _NOEXCEPT {</a>
<a name="1379"><span class="lineNum">    1379 </span>                :            :     return static_cast&lt;_Base2*&gt;(__pair);</a>
<a name="1380"><span class="lineNum">    1380 </span>                :            :   }</a>
<a name="1381"><span class="lineNum">    1381 </span>                :            : </a>
<a name="1382"><span class="lineNum">    1382 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1383"><span class="lineNum">    1383 </span>                :            :   void swap(__compressed_pair&amp; __x)</a>
<a name="1384"><span class="lineNum">    1384 </span>                :            :     _NOEXCEPT_(__is_nothrow_swappable&lt;_T1&gt;::value &amp;&amp;</a>
<a name="1385"><span class="lineNum">    1385 </span>                :            :                __is_nothrow_swappable&lt;_T2&gt;::value)</a>
<a name="1386"><span class="lineNum">    1386 </span>                :            :   {</a>
<a name="1387"><span class="lineNum">    1387 </span>                :            :     using _VSTD::swap;</a>
<a name="1388"><span class="lineNum">    1388 </span>                :            :     swap(first(), __x.first());</a>
<a name="1389"><span class="lineNum">    1389 </span>                :            :     swap(second(), __x.second());</a>
<a name="1390"><span class="lineNum">    1390 </span>                :            :   }</a>
<a name="1391"><span class="lineNum">    1391 </span>                :            : };</a>
<a name="1392"><span class="lineNum">    1392 </span>                :            : </a>
<a name="1393"><span class="lineNum">    1393 </span>                :            : template &lt;class _T1, class _T2&gt;</a>
<a name="1394"><span class="lineNum">    1394 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1395"><span class="lineNum">    1395 </span>                :            : void swap(__compressed_pair&lt;_T1, _T2&gt;&amp; __x, __compressed_pair&lt;_T1, _T2&gt;&amp; __y)</a>
<a name="1396"><span class="lineNum">    1396 </span>                :            :     _NOEXCEPT_(__is_nothrow_swappable&lt;_T1&gt;::value &amp;&amp;</a>
<a name="1397"><span class="lineNum">    1397 </span>                :            :                __is_nothrow_swappable&lt;_T2&gt;::value) {</a>
<a name="1398"><span class="lineNum">    1398 </span>                :            :   __x.swap(__y);</a>
<a name="1399"><span class="lineNum">    1399 </span>                :            : }</a>
<a name="1400"><span class="lineNum">    1400 </span>                :            : </a>
<a name="1401"><span class="lineNum">    1401 </span>                :            : // default_delete</a>
<a name="1402"><span class="lineNum">    1402 </span>                :            : </a>
<a name="1403"><span class="lineNum">    1403 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="1404"><span class="lineNum">    1404 </span>                :            : struct _LIBCPP_TEMPLATE_VIS default_delete {</a>
<a name="1405"><span class="lineNum">    1405 </span>                :            :     static_assert(!is_function&lt;_Tp&gt;::value,</a>
<a name="1406"><span class="lineNum">    1406 </span>                :            :                   &quot;default_delete cannot be instantiated for function types&quot;);</a>
<a name="1407"><span class="lineNum">    1407 </span>                :            : #ifndef _LIBCPP_CXX03_LANG</a>
<a name="1408"><span class="lineNum">    1408 </span>                :            :   _LIBCPP_INLINE_VISIBILITY constexpr default_delete() _NOEXCEPT = default;</a>
<a name="1409"><span class="lineNum">    1409 </span>                :            : #else</a>
<a name="1410"><span class="lineNum">    1410 </span>                :            :   _LIBCPP_INLINE_VISIBILITY default_delete() {}</a>
<a name="1411"><span class="lineNum">    1411 </span>                :            : #endif</a>
<a name="1412"><span class="lineNum">    1412 </span>                :            :   template &lt;class _Up&gt;</a>
<a name="1413"><span class="lineNum">    1413 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1414"><span class="lineNum">    1414 </span>                :            :   default_delete(const default_delete&lt;_Up&gt;&amp;,</a>
<a name="1415"><span class="lineNum">    1415 </span>                :            :                  typename enable_if&lt;is_convertible&lt;_Up*, _Tp*&gt;::value&gt;::type* =</a>
<a name="1416"><span class="lineNum">    1416 </span>                :            :                      0) _NOEXCEPT {}</a>
<a name="1417"><span class="lineNum">    1417 </span>                :            : </a>
<a name="1418"><span class="lineNum">    1418 </span>                :            :   _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __ptr) const _NOEXCEPT {</a>
<a name="1419"><span class="lineNum">    1419 </span>                :            :     static_assert(sizeof(_Tp) &gt; 0,</a>
<a name="1420"><span class="lineNum">    1420 </span>                :            :                   &quot;default_delete can not delete incomplete type&quot;);</a>
<a name="1421"><span class="lineNum">    1421 </span>                :            :     static_assert(!is_void&lt;_Tp&gt;::value,</a>
<a name="1422"><span class="lineNum">    1422 </span>                :            :                   &quot;default_delete can not delete incomplete type&quot;);</a>
<a name="1423"><span class="lineNum">    1423 </span>                :            :     delete __ptr;</a>
<a name="1424"><span class="lineNum">    1424 </span>                :            :   }</a>
<a name="1425"><span class="lineNum">    1425 </span>                :            : };</a>
<a name="1426"><span class="lineNum">    1426 </span>                :            : </a>
<a name="1427"><span class="lineNum">    1427 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="1428"><span class="lineNum">    1428 </span>                :            : struct _LIBCPP_TEMPLATE_VIS default_delete&lt;_Tp[]&gt; {</a>
<a name="1429"><span class="lineNum">    1429 </span>                :            : private:</a>
<a name="1430"><span class="lineNum">    1430 </span>                :            :   template &lt;class _Up&gt;</a>
<a name="1431"><span class="lineNum">    1431 </span>                :            :   struct _EnableIfConvertible</a>
<a name="1432"><span class="lineNum">    1432 </span>                :            :       : enable_if&lt;is_convertible&lt;_Up(*)[], _Tp(*)[]&gt;::value&gt; {};</a>
<a name="1433"><span class="lineNum">    1433 </span>                :            : </a>
<a name="1434"><span class="lineNum">    1434 </span>                :            : public:</a>
<a name="1435"><span class="lineNum">    1435 </span>                :            : #ifndef _LIBCPP_CXX03_LANG</a>
<a name="1436"><span class="lineNum">    1436 </span>                :            :   _LIBCPP_INLINE_VISIBILITY constexpr default_delete() _NOEXCEPT = default;</a>
<a name="1437"><span class="lineNum">    1437 </span>                :            : #else</a>
<a name="1438"><span class="lineNum">    1438 </span>                :            :   _LIBCPP_INLINE_VISIBILITY default_delete() {}</a>
<a name="1439"><span class="lineNum">    1439 </span>                :            : #endif</a>
<a name="1440"><span class="lineNum">    1440 </span>                :            : </a>
<a name="1441"><span class="lineNum">    1441 </span>                :            :   template &lt;class _Up&gt;</a>
<a name="1442"><span class="lineNum">    1442 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1443"><span class="lineNum">    1443 </span>                :            :   default_delete(const default_delete&lt;_Up[]&gt;&amp;,</a>
<a name="1444"><span class="lineNum">    1444 </span>                :            :                  typename _EnableIfConvertible&lt;_Up&gt;::type* = 0) _NOEXCEPT {}</a>
<a name="1445"><span class="lineNum">    1445 </span>                :            : </a>
<a name="1446"><span class="lineNum">    1446 </span>                :            :   template &lt;class _Up&gt;</a>
<a name="1447"><span class="lineNum">    1447 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1448"><span class="lineNum">    1448 </span>                :            :   typename _EnableIfConvertible&lt;_Up&gt;::type</a>
<a name="1449"><span class="lineNum">    1449 </span>                :            :   operator()(_Up* __ptr) const _NOEXCEPT {</a>
<a name="1450"><span class="lineNum">    1450 </span>                :            :     static_assert(sizeof(_Tp) &gt; 0,</a>
<a name="1451"><span class="lineNum">    1451 </span>                :            :                   &quot;default_delete can not delete incomplete type&quot;);</a>
<a name="1452"><span class="lineNum">    1452 </span>                :            :     static_assert(!is_void&lt;_Tp&gt;::value,</a>
<a name="1453"><span class="lineNum">    1453 </span>                :            :                   &quot;default_delete can not delete void type&quot;);</a>
<a name="1454"><span class="lineNum">    1454 </span>                :            :     delete[] __ptr;</a>
<a name="1455"><span class="lineNum">    1455 </span>                :            :   }</a>
<a name="1456"><span class="lineNum">    1456 </span>                :            : };</a>
<a name="1457"><span class="lineNum">    1457 </span>                :            : </a>
<a name="1458"><span class="lineNum">    1458 </span>                :            : template &lt;class _Deleter&gt;</a>
<a name="1459"><span class="lineNum">    1459 </span>                :            : struct __unique_ptr_deleter_sfinae {</a>
<a name="1460"><span class="lineNum">    1460 </span>                :            :   static_assert(!is_reference&lt;_Deleter&gt;::value, &quot;incorrect specialization&quot;);</a>
<a name="1461"><span class="lineNum">    1461 </span>                :            :   typedef const _Deleter&amp; __lval_ref_type;</a>
<a name="1462"><span class="lineNum">    1462 </span>                :            :   typedef _Deleter&amp;&amp; __good_rval_ref_type;</a>
<a name="1463"><span class="lineNum">    1463 </span>                :            :   typedef true_type __enable_rval_overload;</a>
<a name="1464"><span class="lineNum">    1464 </span>                :            : };</a>
<a name="1465"><span class="lineNum">    1465 </span>                :            : </a>
<a name="1466"><span class="lineNum">    1466 </span>                :            : template &lt;class _Deleter&gt;</a>
<a name="1467"><span class="lineNum">    1467 </span>                :            : struct __unique_ptr_deleter_sfinae&lt;_Deleter const&amp;&gt; {</a>
<a name="1468"><span class="lineNum">    1468 </span>                :            :   typedef const _Deleter&amp; __lval_ref_type;</a>
<a name="1469"><span class="lineNum">    1469 </span>                :            :   typedef const _Deleter&amp;&amp; __bad_rval_ref_type;</a>
<a name="1470"><span class="lineNum">    1470 </span>                :            :   typedef false_type __enable_rval_overload;</a>
<a name="1471"><span class="lineNum">    1471 </span>                :            : };</a>
<a name="1472"><span class="lineNum">    1472 </span>                :            : </a>
<a name="1473"><span class="lineNum">    1473 </span>                :            : template &lt;class _Deleter&gt;</a>
<a name="1474"><span class="lineNum">    1474 </span>                :            : struct __unique_ptr_deleter_sfinae&lt;_Deleter&amp;&gt; {</a>
<a name="1475"><span class="lineNum">    1475 </span>                :            :   typedef _Deleter&amp; __lval_ref_type;</a>
<a name="1476"><span class="lineNum">    1476 </span>                :            :   typedef _Deleter&amp;&amp; __bad_rval_ref_type;</a>
<a name="1477"><span class="lineNum">    1477 </span>                :            :   typedef false_type __enable_rval_overload;</a>
<a name="1478"><span class="lineNum">    1478 </span>                :            : };</a>
<a name="1479"><span class="lineNum">    1479 </span>                :            : </a>
<a name="1480"><span class="lineNum">    1480 </span>                :            : #if defined(_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI)</a>
<a name="1481"><span class="lineNum">    1481 </span>                :            : #  define _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI __attribute__((trivial_abi))</a>
<a name="1482"><span class="lineNum">    1482 </span>                :            : #else</a>
<a name="1483"><span class="lineNum">    1483 </span>                :            : #  define _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI</a>
<a name="1484"><span class="lineNum">    1484 </span>                :            : #endif</a>
<a name="1485"><span class="lineNum">    1485 </span>                :            : </a>
<a name="1486"><span class="lineNum">    1486 </span>                :            : template &lt;class _Tp, class _Dp = default_delete&lt;_Tp&gt; &gt;</a>
<a name="1487"><span class="lineNum">    1487 </span>                :            : class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {</a>
<a name="1488"><span class="lineNum">    1488 </span>                :            : public:</a>
<a name="1489"><span class="lineNum">    1489 </span>                :            :   typedef _Tp element_type;</a>
<a name="1490"><span class="lineNum">    1490 </span>                :            :   typedef _Dp deleter_type;</a>
<a name="1491"><span class="lineNum">    1491 </span>                :            :   typedef _LIBCPP_NODEBUG_TYPE typename __pointer&lt;_Tp, deleter_type&gt;::type pointer;</a>
<a name="1492"><span class="lineNum">    1492 </span>                :            : </a>
<a name="1493"><span class="lineNum">    1493 </span>                :            :   static_assert(!is_rvalue_reference&lt;deleter_type&gt;::value,</a>
<a name="1494"><span class="lineNum">    1494 </span>                :            :                 &quot;the specified deleter type cannot be an rvalue reference&quot;);</a>
<a name="1495"><span class="lineNum">    1495 </span>                :            : </a>
<a name="1496"><span class="lineNum">    1496 </span>                :            : private:</a>
<a name="1497"><span class="lineNum">    1497 </span>                :            :   __compressed_pair&lt;pointer, deleter_type&gt; __ptr_;</a>
<a name="1498"><span class="lineNum">    1498 </span>                :            : </a>
<a name="1499"><span class="lineNum">    1499 </span>                :            :   struct __nat { int __for_bool_; };</a>
<a name="1500"><span class="lineNum">    1500 </span>                :            : </a>
<a name="1501"><span class="lineNum">    1501 </span>                :            :   typedef _LIBCPP_NODEBUG_TYPE __unique_ptr_deleter_sfinae&lt;_Dp&gt; _DeleterSFINAE;</a>
<a name="1502"><span class="lineNum">    1502 </span>                :            : </a>
<a name="1503"><span class="lineNum">    1503 </span>                :            :   template &lt;bool _Dummy&gt;</a>
<a name="1504"><span class="lineNum">    1504 </span>                :            :   using _LValRefType _LIBCPP_NODEBUG_TYPE =</a>
<a name="1505"><span class="lineNum">    1505 </span>                :            :       typename __dependent_type&lt;_DeleterSFINAE, _Dummy&gt;::__lval_ref_type;</a>
<a name="1506"><span class="lineNum">    1506 </span>                :            : </a>
<a name="1507"><span class="lineNum">    1507 </span>                :            :   template &lt;bool _Dummy&gt;</a>
<a name="1508"><span class="lineNum">    1508 </span>                :            :   using _GoodRValRefType _LIBCPP_NODEBUG_TYPE =</a>
<a name="1509"><span class="lineNum">    1509 </span>                :            :       typename __dependent_type&lt;_DeleterSFINAE, _Dummy&gt;::__good_rval_ref_type;</a>
<a name="1510"><span class="lineNum">    1510 </span>                :            : </a>
<a name="1511"><span class="lineNum">    1511 </span>                :            :   template &lt;bool _Dummy&gt;</a>
<a name="1512"><span class="lineNum">    1512 </span>                :            :   using _BadRValRefType _LIBCPP_NODEBUG_TYPE  =</a>
<a name="1513"><span class="lineNum">    1513 </span>                :            :       typename __dependent_type&lt;_DeleterSFINAE, _Dummy&gt;::__bad_rval_ref_type;</a>
<a name="1514"><span class="lineNum">    1514 </span>                :            : </a>
<a name="1515"><span class="lineNum">    1515 </span>                :            :   template &lt;bool _Dummy, class _Deleter = typename __dependent_type&lt;</a>
<a name="1516"><span class="lineNum">    1516 </span>                :            :                              __identity&lt;deleter_type&gt;, _Dummy&gt;::type&gt;</a>
<a name="1517"><span class="lineNum">    1517 </span>                :            :   using _EnableIfDeleterDefaultConstructible _LIBCPP_NODEBUG_TYPE =</a>
<a name="1518"><span class="lineNum">    1518 </span>                :            :       typename enable_if&lt;is_default_constructible&lt;_Deleter&gt;::value &amp;&amp;</a>
<a name="1519"><span class="lineNum">    1519 </span>                :            :                          !is_pointer&lt;_Deleter&gt;::value&gt;::type;</a>
<a name="1520"><span class="lineNum">    1520 </span>                :            : </a>
<a name="1521"><span class="lineNum">    1521 </span>                :            :   template &lt;class _ArgType&gt;</a>
<a name="1522"><span class="lineNum">    1522 </span>                :            :   using _EnableIfDeleterConstructible _LIBCPP_NODEBUG_TYPE  =</a>
<a name="1523"><span class="lineNum">    1523 </span>                :            :       typename enable_if&lt;is_constructible&lt;deleter_type, _ArgType&gt;::value&gt;::type;</a>
<a name="1524"><span class="lineNum">    1524 </span>                :            : </a>
<a name="1525"><span class="lineNum">    1525 </span>                :            :   template &lt;class _UPtr, class _Up&gt;</a>
<a name="1526"><span class="lineNum">    1526 </span>                :            :   using _EnableIfMoveConvertible _LIBCPP_NODEBUG_TYPE  = typename enable_if&lt;</a>
<a name="1527"><span class="lineNum">    1527 </span>                :            :       is_convertible&lt;typename _UPtr::pointer, pointer&gt;::value &amp;&amp;</a>
<a name="1528"><span class="lineNum">    1528 </span>                :            :       !is_array&lt;_Up&gt;::value</a>
<a name="1529"><span class="lineNum">    1529 </span>                :            :   &gt;::type;</a>
<a name="1530"><span class="lineNum">    1530 </span>                :            : </a>
<a name="1531"><span class="lineNum">    1531 </span>                :            :   template &lt;class _UDel&gt;</a>
<a name="1532"><span class="lineNum">    1532 </span>                :            :   using _EnableIfDeleterConvertible _LIBCPP_NODEBUG_TYPE  = typename enable_if&lt;</a>
<a name="1533"><span class="lineNum">    1533 </span>                :            :       (is_reference&lt;_Dp&gt;::value &amp;&amp; is_same&lt;_Dp, _UDel&gt;::value) ||</a>
<a name="1534"><span class="lineNum">    1534 </span>                :            :       (!is_reference&lt;_Dp&gt;::value &amp;&amp; is_convertible&lt;_UDel, _Dp&gt;::value)</a>
<a name="1535"><span class="lineNum">    1535 </span>                :            :     &gt;::type;</a>
<a name="1536"><span class="lineNum">    1536 </span>                :            : </a>
<a name="1537"><span class="lineNum">    1537 </span>                :            :   template &lt;class _UDel&gt;</a>
<a name="1538"><span class="lineNum">    1538 </span>                :            :   using _EnableIfDeleterAssignable = typename enable_if&lt;</a>
<a name="1539"><span class="lineNum">    1539 </span>                :            :       is_assignable&lt;_Dp&amp;, _UDel&amp;&amp;&gt;::value</a>
<a name="1540"><span class="lineNum">    1540 </span>                :            :     &gt;::type;</a>
<a name="1541"><span class="lineNum">    1541 </span>                :            : </a>
<a name="1542"><span class="lineNum">    1542 </span>                :            : public:</a>
<a name="1543"><span class="lineNum">    1543 </span>                :            :   template &lt;bool _Dummy = true,</a>
<a name="1544"><span class="lineNum">    1544 </span>                :            :             class = _EnableIfDeleterDefaultConstructible&lt;_Dummy&gt; &gt;</a>
<a name="1545"><span class="lineNum">    1545 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1546"><span class="lineNum">    1546 </span>                :            :   _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT : __ptr_(pointer(), __default_init_tag()) {}</a>
<a name="1547"><span class="lineNum">    1547 </span>                :            : </a>
<a name="1548"><span class="lineNum">    1548 </span>                :            :   template &lt;bool _Dummy = true,</a>
<a name="1549"><span class="lineNum">    1549 </span>                :            :             class = _EnableIfDeleterDefaultConstructible&lt;_Dummy&gt; &gt;</a>
<a name="1550"><span class="lineNum">    1550 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1551"><span class="lineNum">    1551 </span>                :            :   _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(pointer(), __default_init_tag()) {}</a>
<a name="1552"><span class="lineNum">    1552 </span>                :            : </a>
<a name="1553"><span class="lineNum">    1553 </span>                :            :   template &lt;bool _Dummy = true,</a>
<a name="1554"><span class="lineNum">    1554 </span>                :            :             class = _EnableIfDeleterDefaultConstructible&lt;_Dummy&gt; &gt;</a>
<a name="1555"><span class="lineNum">    1555 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1556"><span class="lineNum">    1556 </span>                :            :   explicit unique_ptr(pointer __p) _NOEXCEPT : __ptr_(__p, __default_init_tag()) {}</a>
<a name="1557"><span class="lineNum">    1557 </span>                :            : </a>
<a name="1558"><span class="lineNum">    1558 </span>                :            :   template &lt;bool _Dummy = true,</a>
<a name="1559"><span class="lineNum">    1559 </span>                :            :             class = _EnableIfDeleterConstructible&lt;_LValRefType&lt;_Dummy&gt; &gt; &gt;</a>
<a name="1560"><span class="lineNum">    1560 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1561"><span class="lineNum">    1561 </span>                :            :   unique_ptr(pointer __p, _LValRefType&lt;_Dummy&gt; __d) _NOEXCEPT</a>
<a name="1562"><span class="lineNum">    1562 </span>                :            :       : __ptr_(__p, __d) {}</a>
<a name="1563"><span class="lineNum">    1563 </span>                :            : </a>
<a name="1564"><span class="lineNum">    1564 </span>                :            :   template &lt;bool _Dummy = true,</a>
<a name="1565"><span class="lineNum">    1565 </span>                :            :             class = _EnableIfDeleterConstructible&lt;_GoodRValRefType&lt;_Dummy&gt; &gt; &gt;</a>
<a name="1566"><span class="lineNum">    1566 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1567"><span class="lineNum">    1567 </span>                :            :   unique_ptr(pointer __p, _GoodRValRefType&lt;_Dummy&gt; __d) _NOEXCEPT</a>
<a name="1568"><span class="lineNum">    1568 </span>                :            :       : __ptr_(__p, _VSTD::move(__d)) {</a>
<a name="1569"><span class="lineNum">    1569 </span>                :            :     static_assert(!is_reference&lt;deleter_type&gt;::value,</a>
<a name="1570"><span class="lineNum">    1570 </span>                :            :                   &quot;rvalue deleter bound to reference&quot;);</a>
<a name="1571"><span class="lineNum">    1571 </span>                :            :   }</a>
<a name="1572"><span class="lineNum">    1572 </span>                :            : </a>
<a name="1573"><span class="lineNum">    1573 </span>                :            :   template &lt;bool _Dummy = true,</a>
<a name="1574"><span class="lineNum">    1574 </span>                :            :             class = _EnableIfDeleterConstructible&lt;_BadRValRefType&lt;_Dummy&gt; &gt; &gt;</a>
<a name="1575"><span class="lineNum">    1575 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1576"><span class="lineNum">    1576 </span>                :            :   unique_ptr(pointer __p, _BadRValRefType&lt;_Dummy&gt; __d) = delete;</a>
<a name="1577"><span class="lineNum">    1577 </span>                :            : </a>
<a name="1578"><span class="lineNum">    1578 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1579"><span class="lineNum">    1579 </span>                :            :   unique_ptr(unique_ptr&amp;&amp; __u) _NOEXCEPT</a>
<a name="1580"><span class="lineNum">    1580 </span>                :            :       : __ptr_(__u.release(), _VSTD::forward&lt;deleter_type&gt;(__u.get_deleter())) {</a>
<a name="1581"><span class="lineNum">    1581 </span>                :            :   }</a>
<a name="1582"><span class="lineNum">    1582 </span>                :            : </a>
<a name="1583"><span class="lineNum">    1583 </span>                :            :   template &lt;class _Up, class _Ep,</a>
<a name="1584"><span class="lineNum">    1584 </span>                :            :       class = _EnableIfMoveConvertible&lt;unique_ptr&lt;_Up, _Ep&gt;, _Up&gt;,</a>
<a name="1585"><span class="lineNum">    1585 </span>                :            :       class = _EnableIfDeleterConvertible&lt;_Ep&gt;</a>
<a name="1586"><span class="lineNum">    1586 </span>                :            :   &gt;</a>
<a name="1587"><span class="lineNum">    1587 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1588"><span class="lineNum">    1588 </span>                :            :   unique_ptr(unique_ptr&lt;_Up, _Ep&gt;&amp;&amp; __u) _NOEXCEPT</a>
<a name="1589"><span class="lineNum">    1589 </span>                :            :       : __ptr_(__u.release(), _VSTD::forward&lt;_Ep&gt;(__u.get_deleter())) {}</a>
<a name="1590"><span class="lineNum">    1590 </span>                :            : </a>
<a name="1591"><span class="lineNum">    1591 </span>                :            : #if _LIBCPP_STD_VER &lt;= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)</a>
<a name="1592"><span class="lineNum">    1592 </span>                :            :   template &lt;class _Up&gt;</a>
<a name="1593"><span class="lineNum">    1593 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1594"><span class="lineNum">    1594 </span>                :            :   unique_ptr(auto_ptr&lt;_Up&gt;&amp;&amp; __p,</a>
<a name="1595"><span class="lineNum">    1595 </span>                :            :              typename enable_if&lt;is_convertible&lt;_Up*, _Tp*&gt;::value &amp;&amp;</a>
<a name="1596"><span class="lineNum">    1596 </span>                :            :                                     is_same&lt;_Dp, default_delete&lt;_Tp&gt; &gt;::value,</a>
<a name="1597"><span class="lineNum">    1597 </span>                :            :                                 __nat&gt;::type = __nat()) _NOEXCEPT</a>
<a name="1598"><span class="lineNum">    1598 </span>                :            :       : __ptr_(__p.release(), __default_init_tag()) {}</a>
<a name="1599"><span class="lineNum">    1599 </span>                :            : #endif</a>
<a name="1600"><span class="lineNum">    1600 </span>                :            : </a>
<a name="1601"><span class="lineNum">    1601 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1602"><span class="lineNum">    1602 </span>                :            :   unique_ptr&amp; operator=(unique_ptr&amp;&amp; __u) _NOEXCEPT {</a>
<a name="1603"><span class="lineNum">    1603 </span>                :            :     reset(__u.release());</a>
<a name="1604"><span class="lineNum">    1604 </span>                :            :     __ptr_.second() = _VSTD::forward&lt;deleter_type&gt;(__u.get_deleter());</a>
<a name="1605"><span class="lineNum">    1605 </span>                :            :     return *this;</a>
<a name="1606"><span class="lineNum">    1606 </span>                :            :   }</a>
<a name="1607"><span class="lineNum">    1607 </span>                :            : </a>
<a name="1608"><span class="lineNum">    1608 </span>                :            :   template &lt;class _Up, class _Ep,</a>
<a name="1609"><span class="lineNum">    1609 </span>                :            :       class = _EnableIfMoveConvertible&lt;unique_ptr&lt;_Up, _Ep&gt;, _Up&gt;,</a>
<a name="1610"><span class="lineNum">    1610 </span>                :            :       class = _EnableIfDeleterAssignable&lt;_Ep&gt;</a>
<a name="1611"><span class="lineNum">    1611 </span>                :            :   &gt;</a>
<a name="1612"><span class="lineNum">    1612 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1613"><span class="lineNum">    1613 </span>                :            :   unique_ptr&amp; operator=(unique_ptr&lt;_Up, _Ep&gt;&amp;&amp; __u) _NOEXCEPT {</a>
<a name="1614"><span class="lineNum">    1614 </span>                :            :     reset(__u.release());</a>
<a name="1615"><span class="lineNum">    1615 </span>                :            :     __ptr_.second() = _VSTD::forward&lt;_Ep&gt;(__u.get_deleter());</a>
<a name="1616"><span class="lineNum">    1616 </span>                :            :     return *this;</a>
<a name="1617"><span class="lineNum">    1617 </span>                :            :   }</a>
<a name="1618"><span class="lineNum">    1618 </span>                :            : </a>
<a name="1619"><span class="lineNum">    1619 </span>                :            : #if _LIBCPP_STD_VER &lt;= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)</a>
<a name="1620"><span class="lineNum">    1620 </span>                :            :   template &lt;class _Up&gt;</a>
<a name="1621"><span class="lineNum">    1621 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1622"><span class="lineNum">    1622 </span>                :            :       typename enable_if&lt;is_convertible&lt;_Up*, _Tp*&gt;::value &amp;&amp;</a>
<a name="1623"><span class="lineNum">    1623 </span>                :            :                              is_same&lt;_Dp, default_delete&lt;_Tp&gt; &gt;::value,</a>
<a name="1624"><span class="lineNum">    1624 </span>                :            :                          unique_ptr&amp;&gt;::type</a>
<a name="1625"><span class="lineNum">    1625 </span>                :            :       operator=(auto_ptr&lt;_Up&gt; __p) {</a>
<a name="1626"><span class="lineNum">    1626 </span>                :            :     reset(__p.release());</a>
<a name="1627"><span class="lineNum">    1627 </span>                :            :     return *this;</a>
<a name="1628"><span class="lineNum">    1628 </span>                :            :   }</a>
<a name="1629"><span class="lineNum">    1629 </span>                :            : #endif</a>
<a name="1630"><span class="lineNum">    1630 </span>                :            : </a>
<a name="1631"><span class="lineNum">    1631 </span>                :            : #ifdef _LIBCPP_CXX03_LANG</a>
<a name="1632"><span class="lineNum">    1632 </span>                :            :   unique_ptr(unique_ptr const&amp;) = delete;</a>
<a name="1633"><span class="lineNum">    1633 </span>                :            :   unique_ptr&amp; operator=(unique_ptr const&amp;) = delete;</a>
<a name="1634"><span class="lineNum">    1634 </span>                :            : #endif</a>
<a name="1635"><span class="lineNum">    1635 </span>                :            : </a>
<a name="1636"><span class="lineNum">    1636 </span>                :            : </a>
<a name="1637"><span class="lineNum">    1637 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1638"><span class="lineNum">    1638 </span>                :            :   ~unique_ptr() { reset(); }</a>
<a name="1639"><span class="lineNum">    1639 </span>                :            : </a>
<a name="1640"><span class="lineNum">    1640 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1641"><span class="lineNum">    1641 </span>                :            :   unique_ptr&amp; operator=(nullptr_t) _NOEXCEPT {</a>
<a name="1642"><span class="lineNum">    1642 </span>                :            :     reset();</a>
<a name="1643"><span class="lineNum">    1643 </span>                :            :     return *this;</a>
<a name="1644"><span class="lineNum">    1644 </span>                :            :   }</a>
<a name="1645"><span class="lineNum">    1645 </span>                :            : </a>
<a name="1646"><span class="lineNum">    1646 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1647"><span class="lineNum">    1647 </span>                :            :   typename add_lvalue_reference&lt;_Tp&gt;::type</a>
<a name="1648"><span class="lineNum">    1648 </span>                :            :   operator*() const {</a>
<a name="1649"><span class="lineNum">    1649 </span>                :            :     return *__ptr_.first();</a>
<a name="1650"><span class="lineNum">    1650 </span>                :            :   }</a>
<a name="1651"><span class="lineNum">    1651 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1652"><span class="lineNum">    1652 </span>                :            :   pointer operator-&gt;() const _NOEXCEPT {</a>
<a name="1653"><span class="lineNum">    1653 </span>                :            :     return __ptr_.first();</a>
<a name="1654"><span class="lineNum">    1654 </span>                :            :   }</a>
<a name="1655"><span class="lineNum">    1655 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1656"><span class="lineNum">    1656 </span>                :            :   pointer get() const _NOEXCEPT {</a>
<a name="1657"><span class="lineNum">    1657 </span>                :            :     return __ptr_.first();</a>
<a name="1658"><span class="lineNum">    1658 </span>                :            :   }</a>
<a name="1659"><span class="lineNum">    1659 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1660"><span class="lineNum">    1660 </span>                :            :   deleter_type&amp; get_deleter() _NOEXCEPT {</a>
<a name="1661"><span class="lineNum">    1661 </span>                :            :     return __ptr_.second();</a>
<a name="1662"><span class="lineNum">    1662 </span>                :            :   }</a>
<a name="1663"><span class="lineNum">    1663 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1664"><span class="lineNum">    1664 </span>                :            :   const deleter_type&amp; get_deleter() const _NOEXCEPT {</a>
<a name="1665"><span class="lineNum">    1665 </span>                :            :     return __ptr_.second();</a>
<a name="1666"><span class="lineNum">    1666 </span>                :            :   }</a>
<a name="1667"><span class="lineNum">    1667 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1668"><span class="lineNum">    1668 </span>                :            :   _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT {</a>
<a name="1669"><span class="lineNum">    1669 </span>                :            :     return __ptr_.first() != nullptr;</a>
<a name="1670"><span class="lineNum">    1670 </span>                :            :   }</a>
<a name="1671"><span class="lineNum">    1671 </span>                :            : </a>
<a name="1672"><span class="lineNum">    1672 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1673"><span class="lineNum">    1673 </span>                :            :   pointer release() _NOEXCEPT {</a>
<a name="1674"><span class="lineNum">    1674 </span>                :            :     pointer __t = __ptr_.first();</a>
<a name="1675"><span class="lineNum">    1675 </span>                :            :     __ptr_.first() = pointer();</a>
<a name="1676"><span class="lineNum">    1676 </span>                :            :     return __t;</a>
<a name="1677"><span class="lineNum">    1677 </span>                :            :   }</a>
<a name="1678"><span class="lineNum">    1678 </span>                :            : </a>
<a name="1679"><span class="lineNum">    1679 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1680"><span class="lineNum">    1680 </span>                :            :   void reset(pointer __p = pointer()) _NOEXCEPT {</a>
<a name="1681"><span class="lineNum">    1681 </span>                :            :     pointer __tmp = __ptr_.first();</a>
<a name="1682"><span class="lineNum">    1682 </span>                :            :     __ptr_.first() = __p;</a>
<a name="1683"><span class="lineNum">    1683 </span>                :            :     if (__tmp)</a>
<a name="1684"><span class="lineNum">    1684 </span>                :            :       __ptr_.second()(__tmp);</a>
<a name="1685"><span class="lineNum">    1685 </span>                :            :   }</a>
<a name="1686"><span class="lineNum">    1686 </span>                :            : </a>
<a name="1687"><span class="lineNum">    1687 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1688"><span class="lineNum">    1688 </span>                :            :   void swap(unique_ptr&amp; __u) _NOEXCEPT {</a>
<a name="1689"><span class="lineNum">    1689 </span>                :            :     __ptr_.swap(__u.__ptr_);</a>
<a name="1690"><span class="lineNum">    1690 </span>                :            :   }</a>
<a name="1691"><span class="lineNum">    1691 </span>                :            : };</a>
<a name="1692"><span class="lineNum">    1692 </span>                :            : </a>
<a name="1693"><span class="lineNum">    1693 </span>                :            : </a>
<a name="1694"><span class="lineNum">    1694 </span>                :            : template &lt;class _Tp, class _Dp&gt;</a>
<a name="1695"><span class="lineNum">    1695 </span>                :            : class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr&lt;_Tp[], _Dp&gt; {</a>
<a name="1696"><span class="lineNum">    1696 </span>                :            : public:</a>
<a name="1697"><span class="lineNum">    1697 </span>                :            :   typedef _Tp element_type;</a>
<a name="1698"><span class="lineNum">    1698 </span>                :            :   typedef _Dp deleter_type;</a>
<a name="1699"><span class="lineNum">    1699 </span>                :            :   typedef typename __pointer&lt;_Tp, deleter_type&gt;::type pointer;</a>
<a name="1700"><span class="lineNum">    1700 </span>                :            : </a>
<a name="1701"><span class="lineNum">    1701 </span>                :            : private:</a>
<a name="1702"><span class="lineNum">    1702 </span>                :            :   __compressed_pair&lt;pointer, deleter_type&gt; __ptr_;</a>
<a name="1703"><span class="lineNum">    1703 </span>                :            : </a>
<a name="1704"><span class="lineNum">    1704 </span>                :            :   template &lt;class _From&gt;</a>
<a name="1705"><span class="lineNum">    1705 </span>                :            :   struct _CheckArrayPointerConversion : is_same&lt;_From, pointer&gt; {};</a>
<a name="1706"><span class="lineNum">    1706 </span>                :            : </a>
<a name="1707"><span class="lineNum">    1707 </span>                :            :   template &lt;class _FromElem&gt;</a>
<a name="1708"><span class="lineNum">    1708 </span>                :            :   struct _CheckArrayPointerConversion&lt;_FromElem*&gt;</a>
<a name="1709"><span class="lineNum">    1709 </span>                :            :       : integral_constant&lt;bool,</a>
<a name="1710"><span class="lineNum">    1710 </span>                :            :           is_same&lt;_FromElem*, pointer&gt;::value ||</a>
<a name="1711"><span class="lineNum">    1711 </span>                :            :             (is_same&lt;pointer, element_type*&gt;::value &amp;&amp;</a>
<a name="1712"><span class="lineNum">    1712 </span>                :            :              is_convertible&lt;_FromElem(*)[], element_type(*)[]&gt;::value)</a>
<a name="1713"><span class="lineNum">    1713 </span>                :            :       &gt;</a>
<a name="1714"><span class="lineNum">    1714 </span>                :            :   {};</a>
<a name="1715"><span class="lineNum">    1715 </span>                :            : </a>
<a name="1716"><span class="lineNum">    1716 </span>                :            :   typedef __unique_ptr_deleter_sfinae&lt;_Dp&gt; _DeleterSFINAE;</a>
<a name="1717"><span class="lineNum">    1717 </span>                :            : </a>
<a name="1718"><span class="lineNum">    1718 </span>                :            :   template &lt;bool _Dummy&gt;</a>
<a name="1719"><span class="lineNum">    1719 </span>                :            :   using _LValRefType _LIBCPP_NODEBUG_TYPE =</a>
<a name="1720"><span class="lineNum">    1720 </span>                :            :       typename __dependent_type&lt;_DeleterSFINAE, _Dummy&gt;::__lval_ref_type;</a>
<a name="1721"><span class="lineNum">    1721 </span>                :            : </a>
<a name="1722"><span class="lineNum">    1722 </span>                :            :   template &lt;bool _Dummy&gt;</a>
<a name="1723"><span class="lineNum">    1723 </span>                :            :   using _GoodRValRefType _LIBCPP_NODEBUG_TYPE =</a>
<a name="1724"><span class="lineNum">    1724 </span>                :            :       typename __dependent_type&lt;_DeleterSFINAE, _Dummy&gt;::__good_rval_ref_type;</a>
<a name="1725"><span class="lineNum">    1725 </span>                :            : </a>
<a name="1726"><span class="lineNum">    1726 </span>                :            :   template &lt;bool _Dummy&gt;</a>
<a name="1727"><span class="lineNum">    1727 </span>                :            :   using _BadRValRefType _LIBCPP_NODEBUG_TYPE =</a>
<a name="1728"><span class="lineNum">    1728 </span>                :            :       typename __dependent_type&lt;_DeleterSFINAE, _Dummy&gt;::__bad_rval_ref_type;</a>
<a name="1729"><span class="lineNum">    1729 </span>                :            : </a>
<a name="1730"><span class="lineNum">    1730 </span>                :            :   template &lt;bool _Dummy, class _Deleter = typename __dependent_type&lt;</a>
<a name="1731"><span class="lineNum">    1731 </span>                :            :                              __identity&lt;deleter_type&gt;, _Dummy&gt;::type&gt;</a>
<a name="1732"><span class="lineNum">    1732 </span>                :            :   using _EnableIfDeleterDefaultConstructible _LIBCPP_NODEBUG_TYPE  =</a>
<a name="1733"><span class="lineNum">    1733 </span>                :            :       typename enable_if&lt;is_default_constructible&lt;_Deleter&gt;::value &amp;&amp;</a>
<a name="1734"><span class="lineNum">    1734 </span>                :            :                          !is_pointer&lt;_Deleter&gt;::value&gt;::type;</a>
<a name="1735"><span class="lineNum">    1735 </span>                :            : </a>
<a name="1736"><span class="lineNum">    1736 </span>                :            :   template &lt;class _ArgType&gt;</a>
<a name="1737"><span class="lineNum">    1737 </span>                :            :   using _EnableIfDeleterConstructible _LIBCPP_NODEBUG_TYPE  =</a>
<a name="1738"><span class="lineNum">    1738 </span>                :            :       typename enable_if&lt;is_constructible&lt;deleter_type, _ArgType&gt;::value&gt;::type;</a>
<a name="1739"><span class="lineNum">    1739 </span>                :            : </a>
<a name="1740"><span class="lineNum">    1740 </span>                :            :   template &lt;class _Pp&gt;</a>
<a name="1741"><span class="lineNum">    1741 </span>                :            :   using _EnableIfPointerConvertible _LIBCPP_NODEBUG_TYPE  = typename enable_if&lt;</a>
<a name="1742"><span class="lineNum">    1742 </span>                :            :       _CheckArrayPointerConversion&lt;_Pp&gt;::value</a>
<a name="1743"><span class="lineNum">    1743 </span>                :            :   &gt;::type;</a>
<a name="1744"><span class="lineNum">    1744 </span>                :            : </a>
<a name="1745"><span class="lineNum">    1745 </span>                :            :   template &lt;class _UPtr, class _Up,</a>
<a name="1746"><span class="lineNum">    1746 </span>                :            :         class _ElemT = typename _UPtr::element_type&gt;</a>
<a name="1747"><span class="lineNum">    1747 </span>                :            :   using _EnableIfMoveConvertible _LIBCPP_NODEBUG_TYPE  = typename enable_if&lt;</a>
<a name="1748"><span class="lineNum">    1748 </span>                :            :       is_array&lt;_Up&gt;::value &amp;&amp;</a>
<a name="1749"><span class="lineNum">    1749 </span>                :            :       is_same&lt;pointer, element_type*&gt;::value &amp;&amp;</a>
<a name="1750"><span class="lineNum">    1750 </span>                :            :       is_same&lt;typename _UPtr::pointer, _ElemT*&gt;::value &amp;&amp;</a>
<a name="1751"><span class="lineNum">    1751 </span>                :            :       is_convertible&lt;_ElemT(*)[], element_type(*)[]&gt;::value</a>
<a name="1752"><span class="lineNum">    1752 </span>                :            :     &gt;::type;</a>
<a name="1753"><span class="lineNum">    1753 </span>                :            : </a>
<a name="1754"><span class="lineNum">    1754 </span>                :            :   template &lt;class _UDel&gt;</a>
<a name="1755"><span class="lineNum">    1755 </span>                :            :   using _EnableIfDeleterConvertible _LIBCPP_NODEBUG_TYPE  = typename enable_if&lt;</a>
<a name="1756"><span class="lineNum">    1756 </span>                :            :       (is_reference&lt;_Dp&gt;::value &amp;&amp; is_same&lt;_Dp, _UDel&gt;::value) ||</a>
<a name="1757"><span class="lineNum">    1757 </span>                :            :       (!is_reference&lt;_Dp&gt;::value &amp;&amp; is_convertible&lt;_UDel, _Dp&gt;::value)</a>
<a name="1758"><span class="lineNum">    1758 </span>                :            :     &gt;::type;</a>
<a name="1759"><span class="lineNum">    1759 </span>                :            : </a>
<a name="1760"><span class="lineNum">    1760 </span>                :            :   template &lt;class _UDel&gt;</a>
<a name="1761"><span class="lineNum">    1761 </span>                :            :   using _EnableIfDeleterAssignable _LIBCPP_NODEBUG_TYPE  = typename enable_if&lt;</a>
<a name="1762"><span class="lineNum">    1762 </span>                :            :       is_assignable&lt;_Dp&amp;, _UDel&amp;&amp;&gt;::value</a>
<a name="1763"><span class="lineNum">    1763 </span>                :            :     &gt;::type;</a>
<a name="1764"><span class="lineNum">    1764 </span>                :            : </a>
<a name="1765"><span class="lineNum">    1765 </span>                :            : public:</a>
<a name="1766"><span class="lineNum">    1766 </span>                :            :   template &lt;bool _Dummy = true,</a>
<a name="1767"><span class="lineNum">    1767 </span>                :            :             class = _EnableIfDeleterDefaultConstructible&lt;_Dummy&gt; &gt;</a>
<a name="1768"><span class="lineNum">    1768 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1769"><span class="lineNum">    1769 </span>                :            :   _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT : __ptr_(pointer(), __default_init_tag()) {}</a>
<a name="1770"><span class="lineNum">    1770 </span>                :            : </a>
<a name="1771"><span class="lineNum">    1771 </span>                :            :   template &lt;bool _Dummy = true,</a>
<a name="1772"><span class="lineNum">    1772 </span>                :            :             class = _EnableIfDeleterDefaultConstructible&lt;_Dummy&gt; &gt;</a>
<a name="1773"><span class="lineNum">    1773 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1774"><span class="lineNum">    1774 </span>                :            :   _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(pointer(), __default_init_tag()) {}</a>
<a name="1775"><span class="lineNum">    1775 </span>                :            : </a>
<a name="1776"><span class="lineNum">    1776 </span>                :            :   template &lt;class _Pp, bool _Dummy = true,</a>
<a name="1777"><span class="lineNum">    1777 </span>                :            :             class = _EnableIfDeleterDefaultConstructible&lt;_Dummy&gt;,</a>
<a name="1778"><span class="lineNum">    1778 </span>                :            :             class = _EnableIfPointerConvertible&lt;_Pp&gt; &gt;</a>
<a name="1779"><span class="lineNum">    1779 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1780"><span class="lineNum">    1780 </span>                :            :   explicit unique_ptr(_Pp __p) _NOEXCEPT</a>
<a name="1781"><span class="lineNum">    1781 </span>                :            :       : __ptr_(__p, __default_init_tag()) {}</a>
<a name="1782"><span class="lineNum">    1782 </span>                :            : </a>
<a name="1783"><span class="lineNum">    1783 </span>                :            :   template &lt;class _Pp, bool _Dummy = true,</a>
<a name="1784"><span class="lineNum">    1784 </span>                :            :             class = _EnableIfDeleterConstructible&lt;_LValRefType&lt;_Dummy&gt; &gt;,</a>
<a name="1785"><span class="lineNum">    1785 </span>                :            :             class = _EnableIfPointerConvertible&lt;_Pp&gt; &gt;</a>
<a name="1786"><span class="lineNum">    1786 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1787"><span class="lineNum">    1787 </span>                :            :   unique_ptr(_Pp __p, _LValRefType&lt;_Dummy&gt; __d) _NOEXCEPT</a>
<a name="1788"><span class="lineNum">    1788 </span>                :            :       : __ptr_(__p, __d) {}</a>
<a name="1789"><span class="lineNum">    1789 </span>                :            : </a>
<a name="1790"><span class="lineNum">    1790 </span>                :            :   template &lt;bool _Dummy = true,</a>
<a name="1791"><span class="lineNum">    1791 </span>                :            :             class = _EnableIfDeleterConstructible&lt;_LValRefType&lt;_Dummy&gt; &gt; &gt;</a>
<a name="1792"><span class="lineNum">    1792 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1793"><span class="lineNum">    1793 </span>                :            :   unique_ptr(nullptr_t, _LValRefType&lt;_Dummy&gt; __d) _NOEXCEPT</a>
<a name="1794"><span class="lineNum">    1794 </span>                :            :       : __ptr_(nullptr, __d) {}</a>
<a name="1795"><span class="lineNum">    1795 </span>                :            : </a>
<a name="1796"><span class="lineNum">    1796 </span>                :            :   template &lt;class _Pp, bool _Dummy = true,</a>
<a name="1797"><span class="lineNum">    1797 </span>                :            :             class = _EnableIfDeleterConstructible&lt;_GoodRValRefType&lt;_Dummy&gt; &gt;,</a>
<a name="1798"><span class="lineNum">    1798 </span>                :            :             class = _EnableIfPointerConvertible&lt;_Pp&gt; &gt;</a>
<a name="1799"><span class="lineNum">    1799 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1800"><span class="lineNum">    1800 </span>                :            :   unique_ptr(_Pp __p, _GoodRValRefType&lt;_Dummy&gt; __d) _NOEXCEPT</a>
<a name="1801"><span class="lineNum">    1801 </span>                :            :       : __ptr_(__p, _VSTD::move(__d)) {</a>
<a name="1802"><span class="lineNum">    1802 </span>                :            :     static_assert(!is_reference&lt;deleter_type&gt;::value,</a>
<a name="1803"><span class="lineNum">    1803 </span>                :            :                   &quot;rvalue deleter bound to reference&quot;);</a>
<a name="1804"><span class="lineNum">    1804 </span>                :            :   }</a>
<a name="1805"><span class="lineNum">    1805 </span>                :            : </a>
<a name="1806"><span class="lineNum">    1806 </span>                :            :   template &lt;bool _Dummy = true,</a>
<a name="1807"><span class="lineNum">    1807 </span>                :            :             class = _EnableIfDeleterConstructible&lt;_GoodRValRefType&lt;_Dummy&gt; &gt; &gt;</a>
<a name="1808"><span class="lineNum">    1808 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1809"><span class="lineNum">    1809 </span>                :            :   unique_ptr(nullptr_t, _GoodRValRefType&lt;_Dummy&gt; __d) _NOEXCEPT</a>
<a name="1810"><span class="lineNum">    1810 </span>                :            :       : __ptr_(nullptr, _VSTD::move(__d)) {</a>
<a name="1811"><span class="lineNum">    1811 </span>                :            :     static_assert(!is_reference&lt;deleter_type&gt;::value,</a>
<a name="1812"><span class="lineNum">    1812 </span>                :            :                   &quot;rvalue deleter bound to reference&quot;);</a>
<a name="1813"><span class="lineNum">    1813 </span>                :            :   }</a>
<a name="1814"><span class="lineNum">    1814 </span>                :            : </a>
<a name="1815"><span class="lineNum">    1815 </span>                :            :   template &lt;class _Pp, bool _Dummy = true,</a>
<a name="1816"><span class="lineNum">    1816 </span>                :            :             class = _EnableIfDeleterConstructible&lt;_BadRValRefType&lt;_Dummy&gt; &gt;,</a>
<a name="1817"><span class="lineNum">    1817 </span>                :            :             class = _EnableIfPointerConvertible&lt;_Pp&gt; &gt;</a>
<a name="1818"><span class="lineNum">    1818 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1819"><span class="lineNum">    1819 </span>                :            :   unique_ptr(_Pp __p, _BadRValRefType&lt;_Dummy&gt; __d) = delete;</a>
<a name="1820"><span class="lineNum">    1820 </span>                :            : </a>
<a name="1821"><span class="lineNum">    1821 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1822"><span class="lineNum">    1822 </span>                :            :   unique_ptr(unique_ptr&amp;&amp; __u) _NOEXCEPT</a>
<a name="1823"><span class="lineNum">    1823 </span>                :            :       : __ptr_(__u.release(), _VSTD::forward&lt;deleter_type&gt;(__u.get_deleter())) {</a>
<a name="1824"><span class="lineNum">    1824 </span>                :            :   }</a>
<a name="1825"><span class="lineNum">    1825 </span>                :            : </a>
<a name="1826"><span class="lineNum">    1826 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1827"><span class="lineNum">    1827 </span>                :            :   unique_ptr&amp; operator=(unique_ptr&amp;&amp; __u) _NOEXCEPT {</a>
<a name="1828"><span class="lineNum">    1828 </span>                :            :     reset(__u.release());</a>
<a name="1829"><span class="lineNum">    1829 </span>                :            :     __ptr_.second() = _VSTD::forward&lt;deleter_type&gt;(__u.get_deleter());</a>
<a name="1830"><span class="lineNum">    1830 </span>                :            :     return *this;</a>
<a name="1831"><span class="lineNum">    1831 </span>                :            :   }</a>
<a name="1832"><span class="lineNum">    1832 </span>                :            : </a>
<a name="1833"><span class="lineNum">    1833 </span>                :            :   template &lt;class _Up, class _Ep,</a>
<a name="1834"><span class="lineNum">    1834 </span>                :            :       class = _EnableIfMoveConvertible&lt;unique_ptr&lt;_Up, _Ep&gt;, _Up&gt;,</a>
<a name="1835"><span class="lineNum">    1835 </span>                :            :       class = _EnableIfDeleterConvertible&lt;_Ep&gt;</a>
<a name="1836"><span class="lineNum">    1836 </span>                :            :   &gt;</a>
<a name="1837"><span class="lineNum">    1837 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1838"><span class="lineNum">    1838 </span>                :            :   unique_ptr(unique_ptr&lt;_Up, _Ep&gt;&amp;&amp; __u) _NOEXCEPT</a>
<a name="1839"><span class="lineNum">    1839 </span>                :            :       : __ptr_(__u.release(), _VSTD::forward&lt;_Ep&gt;(__u.get_deleter())) {</a>
<a name="1840"><span class="lineNum">    1840 </span>                :            :   }</a>
<a name="1841"><span class="lineNum">    1841 </span>                :            : </a>
<a name="1842"><span class="lineNum">    1842 </span>                :            :   template &lt;class _Up, class _Ep,</a>
<a name="1843"><span class="lineNum">    1843 </span>                :            :       class = _EnableIfMoveConvertible&lt;unique_ptr&lt;_Up, _Ep&gt;, _Up&gt;,</a>
<a name="1844"><span class="lineNum">    1844 </span>                :            :       class = _EnableIfDeleterAssignable&lt;_Ep&gt;</a>
<a name="1845"><span class="lineNum">    1845 </span>                :            :   &gt;</a>
<a name="1846"><span class="lineNum">    1846 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1847"><span class="lineNum">    1847 </span>                :            :   unique_ptr&amp;</a>
<a name="1848"><span class="lineNum">    1848 </span>                :            :   operator=(unique_ptr&lt;_Up, _Ep&gt;&amp;&amp; __u) _NOEXCEPT {</a>
<a name="1849"><span class="lineNum">    1849 </span>                :            :     reset(__u.release());</a>
<a name="1850"><span class="lineNum">    1850 </span>                :            :     __ptr_.second() = _VSTD::forward&lt;_Ep&gt;(__u.get_deleter());</a>
<a name="1851"><span class="lineNum">    1851 </span>                :            :     return *this;</a>
<a name="1852"><span class="lineNum">    1852 </span>                :            :   }</a>
<a name="1853"><span class="lineNum">    1853 </span>                :            : </a>
<a name="1854"><span class="lineNum">    1854 </span>                :            : #ifdef _LIBCPP_CXX03_LANG</a>
<a name="1855"><span class="lineNum">    1855 </span>                :            :   unique_ptr(unique_ptr const&amp;) = delete;</a>
<a name="1856"><span class="lineNum">    1856 </span>                :            :   unique_ptr&amp; operator=(unique_ptr const&amp;) = delete;</a>
<a name="1857"><span class="lineNum">    1857 </span>                :            : #endif</a>
<a name="1858"><span class="lineNum">    1858 </span>                :            : </a>
<a name="1859"><span class="lineNum">    1859 </span>                :            : public:</a>
<a name="1860"><span class="lineNum">    1860 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1861"><span class="lineNum">    1861 </span>                :            :   ~unique_ptr() { reset(); }</a>
<a name="1862"><span class="lineNum">    1862 </span>                :            : </a>
<a name="1863"><span class="lineNum">    1863 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1864"><span class="lineNum">    1864 </span>                :            :   unique_ptr&amp; operator=(nullptr_t) _NOEXCEPT {</a>
<a name="1865"><span class="lineNum">    1865 </span>                :            :     reset();</a>
<a name="1866"><span class="lineNum">    1866 </span>                :            :     return *this;</a>
<a name="1867"><span class="lineNum">    1867 </span>                :            :   }</a>
<a name="1868"><span class="lineNum">    1868 </span>                :            : </a>
<a name="1869"><span class="lineNum">    1869 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1870"><span class="lineNum">    1870 </span>                :            :   typename add_lvalue_reference&lt;_Tp&gt;::type</a>
<a name="1871"><span class="lineNum">    1871 </span>                :            :   operator[](size_t __i) const {</a>
<a name="1872"><span class="lineNum">    1872 </span>                :            :     return __ptr_.first()[__i];</a>
<a name="1873"><span class="lineNum">    1873 </span>                :            :   }</a>
<a name="1874"><span class="lineNum">    1874 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1875"><span class="lineNum">    1875 </span>                :            :   pointer get() const _NOEXCEPT {</a>
<a name="1876"><span class="lineNum">    1876 </span>                :            :     return __ptr_.first();</a>
<a name="1877"><span class="lineNum">    1877 </span>                :            :   }</a>
<a name="1878"><span class="lineNum">    1878 </span>                :            : </a>
<a name="1879"><span class="lineNum">    1879 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1880"><span class="lineNum">    1880 </span>                :            :   deleter_type&amp; get_deleter() _NOEXCEPT {</a>
<a name="1881"><span class="lineNum">    1881 </span>                :            :     return __ptr_.second();</a>
<a name="1882"><span class="lineNum">    1882 </span>                :            :   }</a>
<a name="1883"><span class="lineNum">    1883 </span>                :            : </a>
<a name="1884"><span class="lineNum">    1884 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1885"><span class="lineNum">    1885 </span>                :            :   const deleter_type&amp; get_deleter() const _NOEXCEPT {</a>
<a name="1886"><span class="lineNum">    1886 </span>                :            :     return __ptr_.second();</a>
<a name="1887"><span class="lineNum">    1887 </span>                :            :   }</a>
<a name="1888"><span class="lineNum">    1888 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1889"><span class="lineNum">    1889 </span>                :            :   _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT {</a>
<a name="1890"><span class="lineNum">    1890 </span>                :            :     return __ptr_.first() != nullptr;</a>
<a name="1891"><span class="lineNum">    1891 </span>                :            :   }</a>
<a name="1892"><span class="lineNum">    1892 </span>                :            : </a>
<a name="1893"><span class="lineNum">    1893 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1894"><span class="lineNum">    1894 </span>                :            :   pointer release() _NOEXCEPT {</a>
<a name="1895"><span class="lineNum">    1895 </span>                :            :     pointer __t = __ptr_.first();</a>
<a name="1896"><span class="lineNum">    1896 </span>                :            :     __ptr_.first() = pointer();</a>
<a name="1897"><span class="lineNum">    1897 </span>                :            :     return __t;</a>
<a name="1898"><span class="lineNum">    1898 </span>                :            :   }</a>
<a name="1899"><span class="lineNum">    1899 </span>                :            : </a>
<a name="1900"><span class="lineNum">    1900 </span>                :            :   template &lt;class _Pp&gt;</a>
<a name="1901"><span class="lineNum">    1901 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1902"><span class="lineNum">    1902 </span>                :            :   typename enable_if&lt;</a>
<a name="1903"><span class="lineNum">    1903 </span>                :            :       _CheckArrayPointerConversion&lt;_Pp&gt;::value</a>
<a name="1904"><span class="lineNum">    1904 </span>                :            :   &gt;::type</a>
<a name="1905"><span class="lineNum">    1905 </span>                :            :   reset(_Pp __p) _NOEXCEPT {</a>
<a name="1906"><span class="lineNum">    1906 </span>                :            :     pointer __tmp = __ptr_.first();</a>
<a name="1907"><span class="lineNum">    1907 </span>                :            :     __ptr_.first() = __p;</a>
<a name="1908"><span class="lineNum">    1908 </span>                :            :     if (__tmp)</a>
<a name="1909"><span class="lineNum">    1909 </span>                :            :       __ptr_.second()(__tmp);</a>
<a name="1910"><span class="lineNum">    1910 </span>                :            :   }</a>
<a name="1911"><span class="lineNum">    1911 </span>                :            : </a>
<a name="1912"><span class="lineNum">    1912 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1913"><span class="lineNum">    1913 </span>                :            :   void reset(nullptr_t = nullptr) _NOEXCEPT {</a>
<a name="1914"><span class="lineNum">    1914 </span>                :            :     pointer __tmp = __ptr_.first();</a>
<a name="1915"><span class="lineNum">    1915 </span>                :            :     __ptr_.first() = nullptr;</a>
<a name="1916"><span class="lineNum">    1916 </span>                :            :     if (__tmp)</a>
<a name="1917"><span class="lineNum">    1917 </span>                :            :       __ptr_.second()(__tmp);</a>
<a name="1918"><span class="lineNum">    1918 </span>                :            :   }</a>
<a name="1919"><span class="lineNum">    1919 </span>                :            : </a>
<a name="1920"><span class="lineNum">    1920 </span>                :            :   _LIBCPP_INLINE_VISIBILITY</a>
<a name="1921"><span class="lineNum">    1921 </span>                :            :   void swap(unique_ptr&amp; __u) _NOEXCEPT {</a>
<a name="1922"><span class="lineNum">    1922 </span>                :            :     __ptr_.swap(__u.__ptr_);</a>
<a name="1923"><span class="lineNum">    1923 </span>                :            :   }</a>
<a name="1924"><span class="lineNum">    1924 </span>                :            : </a>
<a name="1925"><span class="lineNum">    1925 </span>                :            : };</a>
<a name="1926"><span class="lineNum">    1926 </span>                :            : </a>
<a name="1927"><span class="lineNum">    1927 </span>                :            : template &lt;class _Tp, class _Dp&gt;</a>
<a name="1928"><span class="lineNum">    1928 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1929"><span class="lineNum">    1929 </span>                :            : typename enable_if&lt;</a>
<a name="1930"><span class="lineNum">    1930 </span>                :            :     __is_swappable&lt;_Dp&gt;::value,</a>
<a name="1931"><span class="lineNum">    1931 </span>                :            :     void</a>
<a name="1932"><span class="lineNum">    1932 </span>                :            : &gt;::type</a>
<a name="1933"><span class="lineNum">    1933 </span>                :            : swap(unique_ptr&lt;_Tp, _Dp&gt;&amp; __x, unique_ptr&lt;_Tp, _Dp&gt;&amp; __y) _NOEXCEPT {__x.swap(__y);}</a>
<a name="1934"><span class="lineNum">    1934 </span>                :            : </a>
<a name="1935"><span class="lineNum">    1935 </span>                :            : template &lt;class _T1, class _D1, class _T2, class _D2&gt;</a>
<a name="1936"><span class="lineNum">    1936 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1937"><span class="lineNum">    1937 </span>                :            : bool</a>
<a name="1938"><span class="lineNum">    1938 </span>                :            : operator==(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, const unique_ptr&lt;_T2, _D2&gt;&amp; __y) {return __x.get() == __y.get();}</a>
<a name="1939"><span class="lineNum">    1939 </span>                :            : </a>
<a name="1940"><span class="lineNum">    1940 </span>                :            : template &lt;class _T1, class _D1, class _T2, class _D2&gt;</a>
<a name="1941"><span class="lineNum">    1941 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1942"><span class="lineNum">    1942 </span>                :            : bool</a>
<a name="1943"><span class="lineNum">    1943 </span>                :            : operator!=(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, const unique_ptr&lt;_T2, _D2&gt;&amp; __y) {return !(__x == __y);}</a>
<a name="1944"><span class="lineNum">    1944 </span>                :            : </a>
<a name="1945"><span class="lineNum">    1945 </span>                :            : template &lt;class _T1, class _D1, class _T2, class _D2&gt;</a>
<a name="1946"><span class="lineNum">    1946 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1947"><span class="lineNum">    1947 </span>                :            : bool</a>
<a name="1948"><span class="lineNum">    1948 </span>                :            : operator&lt; (const unique_ptr&lt;_T1, _D1&gt;&amp; __x, const unique_ptr&lt;_T2, _D2&gt;&amp; __y)</a>
<a name="1949"><span class="lineNum">    1949 </span>                :            : {</a>
<a name="1950"><span class="lineNum">    1950 </span>                :            :     typedef typename unique_ptr&lt;_T1, _D1&gt;::pointer _P1;</a>
<a name="1951"><span class="lineNum">    1951 </span>                :            :     typedef typename unique_ptr&lt;_T2, _D2&gt;::pointer _P2;</a>
<a name="1952"><span class="lineNum">    1952 </span>                :            :     typedef typename common_type&lt;_P1, _P2&gt;::type _Vp;</a>
<a name="1953"><span class="lineNum">    1953 </span>                :            :     return less&lt;_Vp&gt;()(__x.get(), __y.get());</a>
<a name="1954"><span class="lineNum">    1954 </span>                :            : }</a>
<a name="1955"><span class="lineNum">    1955 </span>                :            : </a>
<a name="1956"><span class="lineNum">    1956 </span>                :            : template &lt;class _T1, class _D1, class _T2, class _D2&gt;</a>
<a name="1957"><span class="lineNum">    1957 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1958"><span class="lineNum">    1958 </span>                :            : bool</a>
<a name="1959"><span class="lineNum">    1959 </span>                :            : operator&gt; (const unique_ptr&lt;_T1, _D1&gt;&amp; __x, const unique_ptr&lt;_T2, _D2&gt;&amp; __y) {return __y &lt; __x;}</a>
<a name="1960"><span class="lineNum">    1960 </span>                :            : </a>
<a name="1961"><span class="lineNum">    1961 </span>                :            : template &lt;class _T1, class _D1, class _T2, class _D2&gt;</a>
<a name="1962"><span class="lineNum">    1962 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1963"><span class="lineNum">    1963 </span>                :            : bool</a>
<a name="1964"><span class="lineNum">    1964 </span>                :            : operator&lt;=(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, const unique_ptr&lt;_T2, _D2&gt;&amp; __y) {return !(__y &lt; __x);}</a>
<a name="1965"><span class="lineNum">    1965 </span>                :            : </a>
<a name="1966"><span class="lineNum">    1966 </span>                :            : template &lt;class _T1, class _D1, class _T2, class _D2&gt;</a>
<a name="1967"><span class="lineNum">    1967 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1968"><span class="lineNum">    1968 </span>                :            : bool</a>
<a name="1969"><span class="lineNum">    1969 </span>                :            : operator&gt;=(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, const unique_ptr&lt;_T2, _D2&gt;&amp; __y) {return !(__x &lt; __y);}</a>
<a name="1970"><span class="lineNum">    1970 </span>                :            : </a>
<a name="1971"><span class="lineNum">    1971 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="1972"><span class="lineNum">    1972 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1973"><span class="lineNum">    1973 </span>                :            : bool</a>
<a name="1974"><span class="lineNum">    1974 </span>                :            : operator==(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, nullptr_t) _NOEXCEPT</a>
<a name="1975"><span class="lineNum">    1975 </span>                :            : {</a>
<a name="1976"><span class="lineNum">    1976 </span>                :            :     return !__x;</a>
<a name="1977"><span class="lineNum">    1977 </span>                :            : }</a>
<a name="1978"><span class="lineNum">    1978 </span>                :            : </a>
<a name="1979"><span class="lineNum">    1979 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="1980"><span class="lineNum">    1980 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1981"><span class="lineNum">    1981 </span>                :            : bool</a>
<a name="1982"><span class="lineNum">    1982 </span>                :            : operator==(nullptr_t, const unique_ptr&lt;_T1, _D1&gt;&amp; __x) _NOEXCEPT</a>
<a name="1983"><span class="lineNum">    1983 </span>                :            : {</a>
<a name="1984"><span class="lineNum">    1984 </span>                :            :     return !__x;</a>
<a name="1985"><span class="lineNum">    1985 </span>                :            : }</a>
<a name="1986"><span class="lineNum">    1986 </span>                :            : </a>
<a name="1987"><span class="lineNum">    1987 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="1988"><span class="lineNum">    1988 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1989"><span class="lineNum">    1989 </span>                :            : bool</a>
<a name="1990"><span class="lineNum">    1990 </span>                :            : operator!=(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, nullptr_t) _NOEXCEPT</a>
<a name="1991"><span class="lineNum">    1991 </span>                :            : {</a>
<a name="1992"><span class="lineNum">    1992 </span>                :            :     return static_cast&lt;bool&gt;(__x);</a>
<a name="1993"><span class="lineNum">    1993 </span>                :            : }</a>
<a name="1994"><span class="lineNum">    1994 </span>                :            : </a>
<a name="1995"><span class="lineNum">    1995 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="1996"><span class="lineNum">    1996 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="1997"><span class="lineNum">    1997 </span>                :            : bool</a>
<a name="1998"><span class="lineNum">    1998 </span>                :            : operator!=(nullptr_t, const unique_ptr&lt;_T1, _D1&gt;&amp; __x) _NOEXCEPT</a>
<a name="1999"><span class="lineNum">    1999 </span>                :            : {</a>
<a name="2000"><span class="lineNum">    2000 </span>                :            :     return static_cast&lt;bool&gt;(__x);</a>
<a name="2001"><span class="lineNum">    2001 </span>                :            : }</a>
<a name="2002"><span class="lineNum">    2002 </span>                :            : </a>
<a name="2003"><span class="lineNum">    2003 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="2004"><span class="lineNum">    2004 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2005"><span class="lineNum">    2005 </span>                :            : bool</a>
<a name="2006"><span class="lineNum">    2006 </span>                :            : operator&lt;(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, nullptr_t)</a>
<a name="2007"><span class="lineNum">    2007 </span>                :            : {</a>
<a name="2008"><span class="lineNum">    2008 </span>                :            :     typedef typename unique_ptr&lt;_T1, _D1&gt;::pointer _P1;</a>
<a name="2009"><span class="lineNum">    2009 </span>                :            :     return less&lt;_P1&gt;()(__x.get(), nullptr);</a>
<a name="2010"><span class="lineNum">    2010 </span>                :            : }</a>
<a name="2011"><span class="lineNum">    2011 </span>                :            : </a>
<a name="2012"><span class="lineNum">    2012 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="2013"><span class="lineNum">    2013 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2014"><span class="lineNum">    2014 </span>                :            : bool</a>
<a name="2015"><span class="lineNum">    2015 </span>                :            : operator&lt;(nullptr_t, const unique_ptr&lt;_T1, _D1&gt;&amp; __x)</a>
<a name="2016"><span class="lineNum">    2016 </span>                :            : {</a>
<a name="2017"><span class="lineNum">    2017 </span>                :            :     typedef typename unique_ptr&lt;_T1, _D1&gt;::pointer _P1;</a>
<a name="2018"><span class="lineNum">    2018 </span>                :            :     return less&lt;_P1&gt;()(nullptr, __x.get());</a>
<a name="2019"><span class="lineNum">    2019 </span>                :            : }</a>
<a name="2020"><span class="lineNum">    2020 </span>                :            : </a>
<a name="2021"><span class="lineNum">    2021 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="2022"><span class="lineNum">    2022 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2023"><span class="lineNum">    2023 </span>                :            : bool</a>
<a name="2024"><span class="lineNum">    2024 </span>                :            : operator&gt;(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, nullptr_t)</a>
<a name="2025"><span class="lineNum">    2025 </span>                :            : {</a>
<a name="2026"><span class="lineNum">    2026 </span>                :            :     return nullptr &lt; __x;</a>
<a name="2027"><span class="lineNum">    2027 </span>                :            : }</a>
<a name="2028"><span class="lineNum">    2028 </span>                :            : </a>
<a name="2029"><span class="lineNum">    2029 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="2030"><span class="lineNum">    2030 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2031"><span class="lineNum">    2031 </span>                :            : bool</a>
<a name="2032"><span class="lineNum">    2032 </span>                :            : operator&gt;(nullptr_t, const unique_ptr&lt;_T1, _D1&gt;&amp; __x)</a>
<a name="2033"><span class="lineNum">    2033 </span>                :            : {</a>
<a name="2034"><span class="lineNum">    2034 </span>                :            :     return __x &lt; nullptr;</a>
<a name="2035"><span class="lineNum">    2035 </span>                :            : }</a>
<a name="2036"><span class="lineNum">    2036 </span>                :            : </a>
<a name="2037"><span class="lineNum">    2037 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="2038"><span class="lineNum">    2038 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2039"><span class="lineNum">    2039 </span>                :            : bool</a>
<a name="2040"><span class="lineNum">    2040 </span>                :            : operator&lt;=(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, nullptr_t)</a>
<a name="2041"><span class="lineNum">    2041 </span>                :            : {</a>
<a name="2042"><span class="lineNum">    2042 </span>                :            :     return !(nullptr &lt; __x);</a>
<a name="2043"><span class="lineNum">    2043 </span>                :            : }</a>
<a name="2044"><span class="lineNum">    2044 </span>                :            : </a>
<a name="2045"><span class="lineNum">    2045 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="2046"><span class="lineNum">    2046 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2047"><span class="lineNum">    2047 </span>                :            : bool</a>
<a name="2048"><span class="lineNum">    2048 </span>                :            : operator&lt;=(nullptr_t, const unique_ptr&lt;_T1, _D1&gt;&amp; __x)</a>
<a name="2049"><span class="lineNum">    2049 </span>                :            : {</a>
<a name="2050"><span class="lineNum">    2050 </span>                :            :     return !(__x &lt; nullptr);</a>
<a name="2051"><span class="lineNum">    2051 </span>                :            : }</a>
<a name="2052"><span class="lineNum">    2052 </span>                :            : </a>
<a name="2053"><span class="lineNum">    2053 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="2054"><span class="lineNum">    2054 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2055"><span class="lineNum">    2055 </span>                :            : bool</a>
<a name="2056"><span class="lineNum">    2056 </span>                :            : operator&gt;=(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, nullptr_t)</a>
<a name="2057"><span class="lineNum">    2057 </span>                :            : {</a>
<a name="2058"><span class="lineNum">    2058 </span>                :            :     return !(__x &lt; nullptr);</a>
<a name="2059"><span class="lineNum">    2059 </span>                :            : }</a>
<a name="2060"><span class="lineNum">    2060 </span>                :            : </a>
<a name="2061"><span class="lineNum">    2061 </span>                :            : template &lt;class _T1, class _D1&gt;</a>
<a name="2062"><span class="lineNum">    2062 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2063"><span class="lineNum">    2063 </span>                :            : bool</a>
<a name="2064"><span class="lineNum">    2064 </span>                :            : operator&gt;=(nullptr_t, const unique_ptr&lt;_T1, _D1&gt;&amp; __x)</a>
<a name="2065"><span class="lineNum">    2065 </span>                :            : {</a>
<a name="2066"><span class="lineNum">    2066 </span>                :            :     return !(nullptr &lt; __x);</a>
<a name="2067"><span class="lineNum">    2067 </span>                :            : }</a>
<a name="2068"><span class="lineNum">    2068 </span>                :            : </a>
<a name="2069"><span class="lineNum">    2069 </span>                :            : #if _LIBCPP_STD_VER &gt; 11</a>
<a name="2070"><span class="lineNum">    2070 </span>                :            : </a>
<a name="2071"><span class="lineNum">    2071 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="2072"><span class="lineNum">    2072 </span>                :            : struct __unique_if</a>
<a name="2073"><span class="lineNum">    2073 </span>                :            : {</a>
<a name="2074"><span class="lineNum">    2074 </span>                :            :     typedef unique_ptr&lt;_Tp&gt; __unique_single;</a>
<a name="2075"><span class="lineNum">    2075 </span>                :            : };</a>
<a name="2076"><span class="lineNum">    2076 </span>                :            : </a>
<a name="2077"><span class="lineNum">    2077 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="2078"><span class="lineNum">    2078 </span>                :            : struct __unique_if&lt;_Tp[]&gt;</a>
<a name="2079"><span class="lineNum">    2079 </span>                :            : {</a>
<a name="2080"><span class="lineNum">    2080 </span>                :            :     typedef unique_ptr&lt;_Tp[]&gt; __unique_array_unknown_bound;</a>
<a name="2081"><span class="lineNum">    2081 </span>                :            : };</a>
<a name="2082"><span class="lineNum">    2082 </span>                :            : </a>
<a name="2083"><span class="lineNum">    2083 </span>                :            : template&lt;class _Tp, size_t _Np&gt;</a>
<a name="2084"><span class="lineNum">    2084 </span>                :            : struct __unique_if&lt;_Tp[_Np]&gt;</a>
<a name="2085"><span class="lineNum">    2085 </span>                :            : {</a>
<a name="2086"><span class="lineNum">    2086 </span>                :            :     typedef void __unique_array_known_bound;</a>
<a name="2087"><span class="lineNum">    2087 </span>                :            : };</a>
<a name="2088"><span class="lineNum">    2088 </span>                :            : </a>
<a name="2089"><span class="lineNum">    2089 </span>                :            : template&lt;class _Tp, class... _Args&gt;</a>
<a name="2090"><span class="lineNum">    2090 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2091"><span class="lineNum">    2091 </span>                :            : typename __unique_if&lt;_Tp&gt;::__unique_single</a>
<a name="2092"><span class="lineNum">    2092 </span>                :            : make_unique(_Args&amp;&amp;... __args)</a>
<a name="2093"><span class="lineNum">    2093 </span>                :            : {</a>
<a name="2094"><span class="lineNum">    2094 </span>                :            :     return unique_ptr&lt;_Tp&gt;(new _Tp(_VSTD::forward&lt;_Args&gt;(__args)...));</a>
<a name="2095"><span class="lineNum">    2095 </span>                :            : }</a>
<a name="2096"><span class="lineNum">    2096 </span>                :            : </a>
<a name="2097"><span class="lineNum">    2097 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="2098"><span class="lineNum">    2098 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2099"><span class="lineNum">    2099 </span>                :            : typename __unique_if&lt;_Tp&gt;::__unique_array_unknown_bound</a>
<a name="2100"><span class="lineNum">    2100 </span>                :            : make_unique(size_t __n)</a>
<a name="2101"><span class="lineNum">    2101 </span>                :            : {</a>
<a name="2102"><span class="lineNum">    2102 </span>                :            :     typedef typename remove_extent&lt;_Tp&gt;::type _Up;</a>
<a name="2103"><span class="lineNum">    2103 </span>                :            :     return unique_ptr&lt;_Tp&gt;(new _Up[__n]());</a>
<a name="2104"><span class="lineNum">    2104 </span>                :            : }</a>
<a name="2105"><span class="lineNum">    2105 </span>                :            : </a>
<a name="2106"><span class="lineNum">    2106 </span>                :            : template&lt;class _Tp, class... _Args&gt;</a>
<a name="2107"><span class="lineNum">    2107 </span>                :            :     typename __unique_if&lt;_Tp&gt;::__unique_array_known_bound</a>
<a name="2108"><span class="lineNum">    2108 </span>                :            :     make_unique(_Args&amp;&amp;...) = delete;</a>
<a name="2109"><span class="lineNum">    2109 </span>                :            : </a>
<a name="2110"><span class="lineNum">    2110 </span>                :            : #endif  // _LIBCPP_STD_VER &gt; 11</a>
<a name="2111"><span class="lineNum">    2111 </span>                :            : </a>
<a name="2112"><span class="lineNum">    2112 </span>                :            : template &lt;class _Tp, class _Dp&gt;</a>
<a name="2113"><span class="lineNum">    2113 </span>                :            : #ifdef _LIBCPP_CXX03_LANG</a>
<a name="2114"><span class="lineNum">    2114 </span>                :            : struct _LIBCPP_TEMPLATE_VIS hash&lt;unique_ptr&lt;_Tp, _Dp&gt; &gt;</a>
<a name="2115"><span class="lineNum">    2115 </span>                :            : #else</a>
<a name="2116"><span class="lineNum">    2116 </span>                :            : struct _LIBCPP_TEMPLATE_VIS hash&lt;__enable_hash_helper&lt;</a>
<a name="2117"><span class="lineNum">    2117 </span>                :            :     unique_ptr&lt;_Tp, _Dp&gt;, typename unique_ptr&lt;_Tp, _Dp&gt;::pointer&gt; &gt;</a>
<a name="2118"><span class="lineNum">    2118 </span>                :            : #endif</a>
<a name="2119"><span class="lineNum">    2119 </span>                :            : {</a>
<a name="2120"><span class="lineNum">    2120 </span>                :            :     typedef unique_ptr&lt;_Tp, _Dp&gt; argument_type;</a>
<a name="2121"><span class="lineNum">    2121 </span>                :            :     typedef size_t               result_type;</a>
<a name="2122"><span class="lineNum">    2122 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2123"><span class="lineNum">    2123 </span>                :            :     result_type operator()(const argument_type&amp; __ptr) const</a>
<a name="2124"><span class="lineNum">    2124 </span>                :            :     {</a>
<a name="2125"><span class="lineNum">    2125 </span>                :            :         typedef typename argument_type::pointer pointer;</a>
<a name="2126"><span class="lineNum">    2126 </span>                :            :         return hash&lt;pointer&gt;()(__ptr.get());</a>
<a name="2127"><span class="lineNum">    2127 </span>                :            :     }</a>
<a name="2128"><span class="lineNum">    2128 </span>                :            : };</a>
<a name="2129"><span class="lineNum">    2129 </span>                :            : </a>
<a name="2130"><span class="lineNum">    2130 </span>                :            : struct __destruct_n</a>
<a name="2131"><span class="lineNum">    2131 </span>                :            : {</a>
<a name="2132"><span class="lineNum">    2132 </span>                :            : private:</a>
<a name="2133"><span class="lineNum">    2133 </span>                :            :     size_t __size_;</a>
<a name="2134"><span class="lineNum">    2134 </span>                :            : </a>
<a name="2135"><span class="lineNum">    2135 </span>                :            :     template &lt;class _Tp&gt;</a>
<a name="2136"><span class="lineNum">    2136 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void __process(_Tp* __p, false_type) _NOEXCEPT</a>
<a name="2137"><span class="lineNum">    2137 </span>                :            :         {for (size_t __i = 0; __i &lt; __size_; ++__i, ++__p) __p-&gt;~_Tp();}</a>
<a name="2138"><span class="lineNum">    2138 </span>                :            : </a>
<a name="2139"><span class="lineNum">    2139 </span>                :            :     template &lt;class _Tp&gt;</a>
<a name="2140"><span class="lineNum">    2140 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void __process(_Tp*, true_type) _NOEXCEPT</a>
<a name="2141"><span class="lineNum">    2141 </span>                :            :         {}</a>
<a name="2142"><span class="lineNum">    2142 </span>                :            : </a>
<a name="2143"><span class="lineNum">    2143 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void __incr(false_type) _NOEXCEPT</a>
<a name="2144"><span class="lineNum">    2144 </span>                :            :         {++__size_;}</a>
<a name="2145"><span class="lineNum">    2145 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void __incr(true_type) _NOEXCEPT</a>
<a name="2146"><span class="lineNum">    2146 </span>                :            :         {}</a>
<a name="2147"><span class="lineNum">    2147 </span>                :            : </a>
<a name="2148"><span class="lineNum">    2148 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void __set(size_t __s, false_type) _NOEXCEPT</a>
<a name="2149"><span class="lineNum">    2149 </span>                :            :         {__size_ = __s;}</a>
<a name="2150"><span class="lineNum">    2150 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void __set(size_t, true_type) _NOEXCEPT</a>
<a name="2151"><span class="lineNum">    2151 </span>                :            :         {}</a>
<a name="2152"><span class="lineNum">    2152 </span>                :            : public:</a>
<a name="2153"><span class="lineNum">    2153 </span>                :            :     _LIBCPP_INLINE_VISIBILITY explicit __destruct_n(size_t __s) _NOEXCEPT</a>
<a name="2154"><span class="lineNum">    2154 </span>                :            :         : __size_(__s) {}</a>
<a name="2155"><span class="lineNum">    2155 </span>                :            : </a>
<a name="2156"><span class="lineNum">    2156 </span>                :            :     template &lt;class _Tp&gt;</a>
<a name="2157"><span class="lineNum">    2157 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void __incr() _NOEXCEPT</a>
<a name="2158"><span class="lineNum">    2158 </span>                :            :         {__incr(integral_constant&lt;bool, is_trivially_destructible&lt;_Tp&gt;::value&gt;());}</a>
<a name="2159"><span class="lineNum">    2159 </span>                :            : </a>
<a name="2160"><span class="lineNum">    2160 </span>                :            :     template &lt;class _Tp&gt;</a>
<a name="2161"><span class="lineNum">    2161 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void __set(size_t __s, _Tp*) _NOEXCEPT</a>
<a name="2162"><span class="lineNum">    2162 </span>                :            :         {__set(__s, integral_constant&lt;bool, is_trivially_destructible&lt;_Tp&gt;::value&gt;());}</a>
<a name="2163"><span class="lineNum">    2163 </span>                :            : </a>
<a name="2164"><span class="lineNum">    2164 </span>                :            :     template &lt;class _Tp&gt;</a>
<a name="2165"><span class="lineNum">    2165 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __p) _NOEXCEPT</a>
<a name="2166"><span class="lineNum">    2166 </span>                :            :         {__process(__p, integral_constant&lt;bool, is_trivially_destructible&lt;_Tp&gt;::value&gt;());}</a>
<a name="2167"><span class="lineNum">    2167 </span>                :            : };</a>
<a name="2168"><span class="lineNum">    2168 </span>                :            : </a>
<a name="2169"><span class="lineNum">    2169 </span>                :            : template &lt;class _Alloc&gt;</a>
<a name="2170"><span class="lineNum">    2170 </span>                :            : class __allocator_destructor</a>
<a name="2171"><span class="lineNum">    2171 </span>                :            : {</a>
<a name="2172"><span class="lineNum">    2172 </span>                :            :     typedef _LIBCPP_NODEBUG_TYPE allocator_traits&lt;_Alloc&gt; __alloc_traits;</a>
<a name="2173"><span class="lineNum">    2173 </span>                :            : public:</a>
<a name="2174"><span class="lineNum">    2174 </span>                :            :     typedef _LIBCPP_NODEBUG_TYPE typename __alloc_traits::pointer pointer;</a>
<a name="2175"><span class="lineNum">    2175 </span>                :            :     typedef _LIBCPP_NODEBUG_TYPE typename __alloc_traits::size_type size_type;</a>
<a name="2176"><span class="lineNum">    2176 </span>                :            : private:</a>
<a name="2177"><span class="lineNum">    2177 </span>                :            :     _Alloc&amp; __alloc_;</a>
<a name="2178"><span class="lineNum">    2178 </span>                :            :     size_type __s_;</a>
<a name="2179"><span class="lineNum">    2179 </span>                :            : public:</a>
<a name="2180"><span class="lineNum">    2180 </span>                :            :     _LIBCPP_INLINE_VISIBILITY __allocator_destructor(_Alloc&amp; __a, size_type __s)</a>
<a name="2181"><span class="lineNum">    2181 </span>                :            :              _NOEXCEPT</a>
<a name="2182"><span class="lineNum">    2182 </span>                :            :         : __alloc_(__a), __s_(__s) {}</a>
<a name="2183"><span class="lineNum">    2183 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2184"><span class="lineNum">    2184 </span>                :            :     void operator()(pointer __p) _NOEXCEPT</a>
<a name="2185"><span class="lineNum">    2185 </span>                :            :         {__alloc_traits::deallocate(__alloc_, __p, __s_);}</a>
<a name="2186"><span class="lineNum">    2186 </span>                :            : };</a>
<a name="2187"><span class="lineNum">    2187 </span>                :            : </a>
<a name="2188"><span class="lineNum">    2188 </span>                :            : template &lt;class _InputIterator, class _ForwardIterator&gt;</a>
<a name="2189"><span class="lineNum">    2189 </span>                :            : _ForwardIterator</a>
<a name="2190"><span class="lineNum">    2190 </span>                :            : uninitialized_copy(_InputIterator __f, _InputIterator __l, _ForwardIterator __r)</a>
<a name="2191"><span class="lineNum">    2191 </span>                :            : {</a>
<a name="2192"><span class="lineNum">    2192 </span>                :            :     typedef typename iterator_traits&lt;_ForwardIterator&gt;::value_type value_type;</a>
<a name="2193"><span class="lineNum">    2193 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2194"><span class="lineNum">    2194 </span>                :            :     _ForwardIterator __s = __r;</a>
<a name="2195"><span class="lineNum">    2195 </span>                :            :     try</a>
<a name="2196"><span class="lineNum">    2196 </span>                :            :     {</a>
<a name="2197"><span class="lineNum">    2197 </span>                :            : #endif</a>
<a name="2198"><span class="lineNum">    2198 </span>                :            :         for (; __f != __l; ++__f, (void) ++__r)</a>
<a name="2199"><span class="lineNum">    2199 </span>                :            :             ::new ((void*)_VSTD::addressof(*__r)) value_type(*__f);</a>
<a name="2200"><span class="lineNum">    2200 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2201"><span class="lineNum">    2201 </span>                :            :     }</a>
<a name="2202"><span class="lineNum">    2202 </span>                :            :     catch (...)</a>
<a name="2203"><span class="lineNum">    2203 </span>                :            :     {</a>
<a name="2204"><span class="lineNum">    2204 </span>                :            :         for (; __s != __r; ++__s)</a>
<a name="2205"><span class="lineNum">    2205 </span>                :            :             __s-&gt;~value_type();</a>
<a name="2206"><span class="lineNum">    2206 </span>                :            :         throw;</a>
<a name="2207"><span class="lineNum">    2207 </span>                :            :     }</a>
<a name="2208"><span class="lineNum">    2208 </span>                :            : #endif</a>
<a name="2209"><span class="lineNum">    2209 </span>                :            :     return __r;</a>
<a name="2210"><span class="lineNum">    2210 </span>                :            : }</a>
<a name="2211"><span class="lineNum">    2211 </span>                :            : </a>
<a name="2212"><span class="lineNum">    2212 </span>                :            : template &lt;class _InputIterator, class _Size, class _ForwardIterator&gt;</a>
<a name="2213"><span class="lineNum">    2213 </span>                :            : _ForwardIterator</a>
<a name="2214"><span class="lineNum">    2214 </span>                :            : uninitialized_copy_n(_InputIterator __f, _Size __n, _ForwardIterator __r)</a>
<a name="2215"><span class="lineNum">    2215 </span>                :            : {</a>
<a name="2216"><span class="lineNum">    2216 </span>                :            :     typedef typename iterator_traits&lt;_ForwardIterator&gt;::value_type value_type;</a>
<a name="2217"><span class="lineNum">    2217 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2218"><span class="lineNum">    2218 </span>                :            :     _ForwardIterator __s = __r;</a>
<a name="2219"><span class="lineNum">    2219 </span>                :            :     try</a>
<a name="2220"><span class="lineNum">    2220 </span>                :            :     {</a>
<a name="2221"><span class="lineNum">    2221 </span>                :            : #endif</a>
<a name="2222"><span class="lineNum">    2222 </span>                :            :         for (; __n &gt; 0; ++__f, (void) ++__r, (void) --__n)</a>
<a name="2223"><span class="lineNum">    2223 </span>                :            :             ::new ((void*)_VSTD::addressof(*__r)) value_type(*__f);</a>
<a name="2224"><span class="lineNum">    2224 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2225"><span class="lineNum">    2225 </span>                :            :     }</a>
<a name="2226"><span class="lineNum">    2226 </span>                :            :     catch (...)</a>
<a name="2227"><span class="lineNum">    2227 </span>                :            :     {</a>
<a name="2228"><span class="lineNum">    2228 </span>                :            :         for (; __s != __r; ++__s)</a>
<a name="2229"><span class="lineNum">    2229 </span>                :            :             __s-&gt;~value_type();</a>
<a name="2230"><span class="lineNum">    2230 </span>                :            :         throw;</a>
<a name="2231"><span class="lineNum">    2231 </span>                :            :     }</a>
<a name="2232"><span class="lineNum">    2232 </span>                :            : #endif</a>
<a name="2233"><span class="lineNum">    2233 </span>                :            :     return __r;</a>
<a name="2234"><span class="lineNum">    2234 </span>                :            : }</a>
<a name="2235"><span class="lineNum">    2235 </span>                :            : </a>
<a name="2236"><span class="lineNum">    2236 </span>                :            : template &lt;class _ForwardIterator, class _Tp&gt;</a>
<a name="2237"><span class="lineNum">    2237 </span>                :            : void</a>
<a name="2238"><span class="lineNum">    2238 </span>                :            : uninitialized_fill(_ForwardIterator __f, _ForwardIterator __l, const _Tp&amp; __x)</a>
<a name="2239"><span class="lineNum">    2239 </span>                :            : {</a>
<a name="2240"><span class="lineNum">    2240 </span>                :            :     typedef typename iterator_traits&lt;_ForwardIterator&gt;::value_type value_type;</a>
<a name="2241"><span class="lineNum">    2241 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2242"><span class="lineNum">    2242 </span>                :            :     _ForwardIterator __s = __f;</a>
<a name="2243"><span class="lineNum">    2243 </span>                :            :     try</a>
<a name="2244"><span class="lineNum">    2244 </span>                :            :     {</a>
<a name="2245"><span class="lineNum">    2245 </span>                :            : #endif</a>
<a name="2246"><span class="lineNum">    2246 </span>                :            :         for (; __f != __l; ++__f)</a>
<a name="2247"><span class="lineNum">    2247 </span>                :            :             ::new ((void*)_VSTD::addressof(*__f)) value_type(__x);</a>
<a name="2248"><span class="lineNum">    2248 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2249"><span class="lineNum">    2249 </span>                :            :     }</a>
<a name="2250"><span class="lineNum">    2250 </span>                :            :     catch (...)</a>
<a name="2251"><span class="lineNum">    2251 </span>                :            :     {</a>
<a name="2252"><span class="lineNum">    2252 </span>                :            :         for (; __s != __f; ++__s)</a>
<a name="2253"><span class="lineNum">    2253 </span>                :            :             __s-&gt;~value_type();</a>
<a name="2254"><span class="lineNum">    2254 </span>                :            :         throw;</a>
<a name="2255"><span class="lineNum">    2255 </span>                :            :     }</a>
<a name="2256"><span class="lineNum">    2256 </span>                :            : #endif</a>
<a name="2257"><span class="lineNum">    2257 </span>                :            : }</a>
<a name="2258"><span class="lineNum">    2258 </span>                :            : </a>
<a name="2259"><span class="lineNum">    2259 </span>                :            : template &lt;class _ForwardIterator, class _Size, class _Tp&gt;</a>
<a name="2260"><span class="lineNum">    2260 </span>                :            : _ForwardIterator</a>
<a name="2261"><span class="lineNum">    2261 </span>                :            : uninitialized_fill_n(_ForwardIterator __f, _Size __n, const _Tp&amp; __x)</a>
<a name="2262"><span class="lineNum">    2262 </span>                :            : {</a>
<a name="2263"><span class="lineNum">    2263 </span>                :            :     typedef typename iterator_traits&lt;_ForwardIterator&gt;::value_type value_type;</a>
<a name="2264"><span class="lineNum">    2264 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2265"><span class="lineNum">    2265 </span>                :            :     _ForwardIterator __s = __f;</a>
<a name="2266"><span class="lineNum">    2266 </span>                :            :     try</a>
<a name="2267"><span class="lineNum">    2267 </span>                :            :     {</a>
<a name="2268"><span class="lineNum">    2268 </span>                :            : #endif</a>
<a name="2269"><span class="lineNum">    2269 </span>                :            :         for (; __n &gt; 0; ++__f, (void) --__n)</a>
<a name="2270"><span class="lineNum">    2270 </span>                :            :             ::new ((void*)_VSTD::addressof(*__f)) value_type(__x);</a>
<a name="2271"><span class="lineNum">    2271 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2272"><span class="lineNum">    2272 </span>                :            :     }</a>
<a name="2273"><span class="lineNum">    2273 </span>                :            :     catch (...)</a>
<a name="2274"><span class="lineNum">    2274 </span>                :            :     {</a>
<a name="2275"><span class="lineNum">    2275 </span>                :            :         for (; __s != __f; ++__s)</a>
<a name="2276"><span class="lineNum">    2276 </span>                :            :             __s-&gt;~value_type();</a>
<a name="2277"><span class="lineNum">    2277 </span>                :            :         throw;</a>
<a name="2278"><span class="lineNum">    2278 </span>                :            :     }</a>
<a name="2279"><span class="lineNum">    2279 </span>                :            : #endif</a>
<a name="2280"><span class="lineNum">    2280 </span>                :            :     return __f;</a>
<a name="2281"><span class="lineNum">    2281 </span>                :            : }</a>
<a name="2282"><span class="lineNum">    2282 </span>                :            : </a>
<a name="2283"><span class="lineNum">    2283 </span>                :            : #if _LIBCPP_STD_VER &gt; 14</a>
<a name="2284"><span class="lineNum">    2284 </span>                :            : </a>
<a name="2285"><span class="lineNum">    2285 </span>                :            : template &lt;class _ForwardIterator&gt;</a>
<a name="2286"><span class="lineNum">    2286 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="2287"><span class="lineNum">    2287 </span>                :            : void destroy(_ForwardIterator __first, _ForwardIterator __last) {</a>
<a name="2288"><span class="lineNum">    2288 </span>                :            :     for (; __first != __last; ++__first)</a>
<a name="2289"><span class="lineNum">    2289 </span>                :            :         _VSTD::destroy_at(_VSTD::addressof(*__first));</a>
<a name="2290"><span class="lineNum">    2290 </span>                :            : }</a>
<a name="2291"><span class="lineNum">    2291 </span>                :            : </a>
<a name="2292"><span class="lineNum">    2292 </span>                :            : template &lt;class _ForwardIterator, class _Size&gt;</a>
<a name="2293"><span class="lineNum">    2293 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17</a>
<a name="2294"><span class="lineNum">    2294 </span>                :            : _ForwardIterator destroy_n(_ForwardIterator __first, _Size __n) {</a>
<a name="2295"><span class="lineNum">    2295 </span>                :            :     for (; __n &gt; 0; (void)++__first, --__n)</a>
<a name="2296"><span class="lineNum">    2296 </span>                :            :         _VSTD::destroy_at(_VSTD::addressof(*__first));</a>
<a name="2297"><span class="lineNum">    2297 </span>                :            :     return __first;</a>
<a name="2298"><span class="lineNum">    2298 </span>                :            : }</a>
<a name="2299"><span class="lineNum">    2299 </span>                :            : </a>
<a name="2300"><span class="lineNum">    2300 </span>                :            : template &lt;class _ForwardIterator&gt;</a>
<a name="2301"><span class="lineNum">    2301 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2302"><span class="lineNum">    2302 </span>                :            : void uninitialized_default_construct(_ForwardIterator __first, _ForwardIterator __last) {</a>
<a name="2303"><span class="lineNum">    2303 </span>                :            :     using _Vt = typename iterator_traits&lt;_ForwardIterator&gt;::value_type;</a>
<a name="2304"><span class="lineNum">    2304 </span>                :            :     auto __idx = __first;</a>
<a name="2305"><span class="lineNum">    2305 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2306"><span class="lineNum">    2306 </span>                :            :     try {</a>
<a name="2307"><span class="lineNum">    2307 </span>                :            : #endif</a>
<a name="2308"><span class="lineNum">    2308 </span>                :            :     for (; __idx != __last; ++__idx)</a>
<a name="2309"><span class="lineNum">    2309 </span>                :            :         ::new ((void*)_VSTD::addressof(*__idx)) _Vt;</a>
<a name="2310"><span class="lineNum">    2310 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2311"><span class="lineNum">    2311 </span>                :            :     } catch (...) {</a>
<a name="2312"><span class="lineNum">    2312 </span>                :            :         _VSTD::destroy(__first, __idx);</a>
<a name="2313"><span class="lineNum">    2313 </span>                :            :         throw;</a>
<a name="2314"><span class="lineNum">    2314 </span>                :            :     }</a>
<a name="2315"><span class="lineNum">    2315 </span>                :            : #endif</a>
<a name="2316"><span class="lineNum">    2316 </span>                :            : }</a>
<a name="2317"><span class="lineNum">    2317 </span>                :            : </a>
<a name="2318"><span class="lineNum">    2318 </span>                :            : template &lt;class _ForwardIterator, class _Size&gt;</a>
<a name="2319"><span class="lineNum">    2319 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2320"><span class="lineNum">    2320 </span>                :            : _ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, _Size __n) {</a>
<a name="2321"><span class="lineNum">    2321 </span>                :            :     using _Vt = typename iterator_traits&lt;_ForwardIterator&gt;::value_type;</a>
<a name="2322"><span class="lineNum">    2322 </span>                :            :     auto __idx = __first;</a>
<a name="2323"><span class="lineNum">    2323 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2324"><span class="lineNum">    2324 </span>                :            :     try {</a>
<a name="2325"><span class="lineNum">    2325 </span>                :            : #endif</a>
<a name="2326"><span class="lineNum">    2326 </span>                :            :     for (; __n &gt; 0; (void)++__idx, --__n)</a>
<a name="2327"><span class="lineNum">    2327 </span>                :            :         ::new ((void*)_VSTD::addressof(*__idx)) _Vt;</a>
<a name="2328"><span class="lineNum">    2328 </span>                :            :     return __idx;</a>
<a name="2329"><span class="lineNum">    2329 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2330"><span class="lineNum">    2330 </span>                :            :     } catch (...) {</a>
<a name="2331"><span class="lineNum">    2331 </span>                :            :         _VSTD::destroy(__first, __idx);</a>
<a name="2332"><span class="lineNum">    2332 </span>                :            :         throw;</a>
<a name="2333"><span class="lineNum">    2333 </span>                :            :     }</a>
<a name="2334"><span class="lineNum">    2334 </span>                :            : #endif</a>
<a name="2335"><span class="lineNum">    2335 </span>                :            : }</a>
<a name="2336"><span class="lineNum">    2336 </span>                :            : </a>
<a name="2337"><span class="lineNum">    2337 </span>                :            : </a>
<a name="2338"><span class="lineNum">    2338 </span>                :            : template &lt;class _ForwardIterator&gt;</a>
<a name="2339"><span class="lineNum">    2339 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2340"><span class="lineNum">    2340 </span>                :            : void uninitialized_value_construct(_ForwardIterator __first, _ForwardIterator __last) {</a>
<a name="2341"><span class="lineNum">    2341 </span>                :            :     using _Vt = typename iterator_traits&lt;_ForwardIterator&gt;::value_type;</a>
<a name="2342"><span class="lineNum">    2342 </span>                :            :     auto __idx = __first;</a>
<a name="2343"><span class="lineNum">    2343 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2344"><span class="lineNum">    2344 </span>                :            :     try {</a>
<a name="2345"><span class="lineNum">    2345 </span>                :            : #endif</a>
<a name="2346"><span class="lineNum">    2346 </span>                :            :     for (; __idx != __last; ++__idx)</a>
<a name="2347"><span class="lineNum">    2347 </span>                :            :         ::new ((void*)_VSTD::addressof(*__idx)) _Vt();</a>
<a name="2348"><span class="lineNum">    2348 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2349"><span class="lineNum">    2349 </span>                :            :     } catch (...) {</a>
<a name="2350"><span class="lineNum">    2350 </span>                :            :         _VSTD::destroy(__first, __idx);</a>
<a name="2351"><span class="lineNum">    2351 </span>                :            :         throw;</a>
<a name="2352"><span class="lineNum">    2352 </span>                :            :     }</a>
<a name="2353"><span class="lineNum">    2353 </span>                :            : #endif</a>
<a name="2354"><span class="lineNum">    2354 </span>                :            : }</a>
<a name="2355"><span class="lineNum">    2355 </span>                :            : </a>
<a name="2356"><span class="lineNum">    2356 </span>                :            : template &lt;class _ForwardIterator, class _Size&gt;</a>
<a name="2357"><span class="lineNum">    2357 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2358"><span class="lineNum">    2358 </span>                :            : _ForwardIterator uninitialized_value_construct_n(_ForwardIterator __first, _Size __n) {</a>
<a name="2359"><span class="lineNum">    2359 </span>                :            :     using _Vt = typename iterator_traits&lt;_ForwardIterator&gt;::value_type;</a>
<a name="2360"><span class="lineNum">    2360 </span>                :            :     auto __idx = __first;</a>
<a name="2361"><span class="lineNum">    2361 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2362"><span class="lineNum">    2362 </span>                :            :     try {</a>
<a name="2363"><span class="lineNum">    2363 </span>                :            : #endif</a>
<a name="2364"><span class="lineNum">    2364 </span>                :            :     for (; __n &gt; 0; (void)++__idx, --__n)</a>
<a name="2365"><span class="lineNum">    2365 </span>                :            :         ::new ((void*)_VSTD::addressof(*__idx)) _Vt();</a>
<a name="2366"><span class="lineNum">    2366 </span>                :            :     return __idx;</a>
<a name="2367"><span class="lineNum">    2367 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2368"><span class="lineNum">    2368 </span>                :            :     } catch (...) {</a>
<a name="2369"><span class="lineNum">    2369 </span>                :            :         _VSTD::destroy(__first, __idx);</a>
<a name="2370"><span class="lineNum">    2370 </span>                :            :         throw;</a>
<a name="2371"><span class="lineNum">    2371 </span>                :            :     }</a>
<a name="2372"><span class="lineNum">    2372 </span>                :            : #endif</a>
<a name="2373"><span class="lineNum">    2373 </span>                :            : }</a>
<a name="2374"><span class="lineNum">    2374 </span>                :            : </a>
<a name="2375"><span class="lineNum">    2375 </span>                :            : </a>
<a name="2376"><span class="lineNum">    2376 </span>                :            : template &lt;class _InputIt, class _ForwardIt&gt;</a>
<a name="2377"><span class="lineNum">    2377 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2378"><span class="lineNum">    2378 </span>                :            : _ForwardIt uninitialized_move(_InputIt __first, _InputIt __last, _ForwardIt __first_res) {</a>
<a name="2379"><span class="lineNum">    2379 </span>                :            :     using _Vt = typename iterator_traits&lt;_ForwardIt&gt;::value_type;</a>
<a name="2380"><span class="lineNum">    2380 </span>                :            :     auto __idx = __first_res;</a>
<a name="2381"><span class="lineNum">    2381 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2382"><span class="lineNum">    2382 </span>                :            :     try {</a>
<a name="2383"><span class="lineNum">    2383 </span>                :            : #endif</a>
<a name="2384"><span class="lineNum">    2384 </span>                :            :     for (; __first != __last; (void)++__idx, ++__first)</a>
<a name="2385"><span class="lineNum">    2385 </span>                :            :         ::new ((void*)_VSTD::addressof(*__idx)) _Vt(_VSTD::move(*__first));</a>
<a name="2386"><span class="lineNum">    2386 </span>                :            :     return __idx;</a>
<a name="2387"><span class="lineNum">    2387 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2388"><span class="lineNum">    2388 </span>                :            :     } catch (...) {</a>
<a name="2389"><span class="lineNum">    2389 </span>                :            :         _VSTD::destroy(__first_res, __idx);</a>
<a name="2390"><span class="lineNum">    2390 </span>                :            :         throw;</a>
<a name="2391"><span class="lineNum">    2391 </span>                :            :     }</a>
<a name="2392"><span class="lineNum">    2392 </span>                :            : #endif</a>
<a name="2393"><span class="lineNum">    2393 </span>                :            : }</a>
<a name="2394"><span class="lineNum">    2394 </span>                :            : </a>
<a name="2395"><span class="lineNum">    2395 </span>                :            : template &lt;class _InputIt, class _Size, class _ForwardIt&gt;</a>
<a name="2396"><span class="lineNum">    2396 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2397"><span class="lineNum">    2397 </span>                :            : pair&lt;_InputIt, _ForwardIt&gt;</a>
<a name="2398"><span class="lineNum">    2398 </span>                :            : uninitialized_move_n(_InputIt __first, _Size __n, _ForwardIt __first_res) {</a>
<a name="2399"><span class="lineNum">    2399 </span>                :            :     using _Vt = typename iterator_traits&lt;_ForwardIt&gt;::value_type;</a>
<a name="2400"><span class="lineNum">    2400 </span>                :            :     auto __idx = __first_res;</a>
<a name="2401"><span class="lineNum">    2401 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2402"><span class="lineNum">    2402 </span>                :            :     try {</a>
<a name="2403"><span class="lineNum">    2403 </span>                :            : #endif</a>
<a name="2404"><span class="lineNum">    2404 </span>                :            :     for (; __n &gt; 0; ++__idx, (void)++__first, --__n)</a>
<a name="2405"><span class="lineNum">    2405 </span>                :            :         ::new ((void*)_VSTD::addressof(*__idx)) _Vt(_VSTD::move(*__first));</a>
<a name="2406"><span class="lineNum">    2406 </span>                :            :     return {__first, __idx};</a>
<a name="2407"><span class="lineNum">    2407 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2408"><span class="lineNum">    2408 </span>                :            :     } catch (...) {</a>
<a name="2409"><span class="lineNum">    2409 </span>                :            :         _VSTD::destroy(__first_res, __idx);</a>
<a name="2410"><span class="lineNum">    2410 </span>                :            :         throw;</a>
<a name="2411"><span class="lineNum">    2411 </span>                :            :     }</a>
<a name="2412"><span class="lineNum">    2412 </span>                :            : #endif</a>
<a name="2413"><span class="lineNum">    2413 </span>                :            : }</a>
<a name="2414"><span class="lineNum">    2414 </span>                :            : </a>
<a name="2415"><span class="lineNum">    2415 </span>                :            : </a>
<a name="2416"><span class="lineNum">    2416 </span>                :            : #endif // _LIBCPP_STD_VER &gt; 14</a>
<a name="2417"><span class="lineNum">    2417 </span>                :            : </a>
<a name="2418"><span class="lineNum">    2418 </span>                :            : // NOTE: Relaxed and acq/rel atomics (for increment and decrement respectively)</a>
<a name="2419"><span class="lineNum">    2419 </span>                :            : // should be sufficient for thread safety.</a>
<a name="2420"><span class="lineNum">    2420 </span>                :            : // See https://bugs.llvm.org/show_bug.cgi?id=22803</a>
<a name="2421"><span class="lineNum">    2421 </span>                :            : #if defined(__clang__) &amp;&amp; __has_builtin(__atomic_add_fetch)          \</a>
<a name="2422"><span class="lineNum">    2422 </span>                :            :                        &amp;&amp; defined(__ATOMIC_RELAXED)                  \</a>
<a name="2423"><span class="lineNum">    2423 </span>                :            :                        &amp;&amp; defined(__ATOMIC_ACQ_REL)</a>
<a name="2424"><span class="lineNum">    2424 </span>                :            : #   define _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT</a>
<a name="2425"><span class="lineNum">    2425 </span>                :            : #elif defined(_LIBCPP_COMPILER_GCC)</a>
<a name="2426"><span class="lineNum">    2426 </span>                :            : #   define _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT</a>
<a name="2427"><span class="lineNum">    2427 </span>                :            : #endif</a>
<a name="2428"><span class="lineNum">    2428 </span>                :            : </a>
<a name="2429"><span class="lineNum">    2429 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="2430"><span class="lineNum">    2430 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY _Tp</a>
<a name="2431"><span class="lineNum">    2431 </span>                :            : __libcpp_atomic_refcount_increment(_Tp&amp; __t) _NOEXCEPT</a>
<a name="2432"><span class="lineNum">    2432 </span>                :            : {</a>
<a name="2433"><span class="lineNum">    2433 </span>                :            : #if defined(_LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT) &amp;&amp; !defined(_LIBCPP_HAS_NO_THREADS)</a>
<a name="2434"><span class="lineNum">    2434 </span>                :            :     return __atomic_add_fetch(&amp;__t, 1, __ATOMIC_RELAXED);</a>
<a name="2435"><span class="lineNum">    2435 </span>                :            : #else</a>
<a name="2436"><span class="lineNum">    2436 </span>                :            :     return __t += 1;</a>
<a name="2437"><span class="lineNum">    2437 </span>                :            : #endif</a>
<a name="2438"><span class="lineNum">    2438 </span>                :            : }</a>
<a name="2439"><span class="lineNum">    2439 </span>                :            : </a>
<a name="2440"><span class="lineNum">    2440 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="2441"><span class="lineNum">    2441 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY _Tp</a>
<a name="2442"><span class="lineNum">    2442 </span>                :            : __libcpp_atomic_refcount_decrement(_Tp&amp; __t) _NOEXCEPT</a>
<a name="2443"><span class="lineNum">    2443 </span>                :            : {</a>
<a name="2444"><span class="lineNum">    2444 </span>                :            : #if defined(_LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT) &amp;&amp; !defined(_LIBCPP_HAS_NO_THREADS)</a>
<a name="2445"><span class="lineNum">    2445 </span>                :            :     return __atomic_add_fetch(&amp;__t, -1, __ATOMIC_ACQ_REL);</a>
<a name="2446"><span class="lineNum">    2446 </span>                :            : #else</a>
<a name="2447"><span class="lineNum">    2447 </span>                :            :     return __t -= 1;</a>
<a name="2448"><span class="lineNum">    2448 </span>                :            : #endif</a>
<a name="2449"><span class="lineNum">    2449 </span>                :            : }</a>
<a name="2450"><span class="lineNum">    2450 </span>                :            : </a>
<a name="2451"><span class="lineNum">    2451 </span>                :            : class _LIBCPP_EXCEPTION_ABI bad_weak_ptr</a>
<a name="2452"><span class="lineNum">    2452 </span>                :            :     : public std::exception</a>
<a name="2453"><span class="lineNum">    2453 </span>                :            : {</a>
<a name="2454"><span class="lineNum">    2454 </span>                :            : public:</a>
<a name="2455"><span class="lineNum">    2455 </span>                :            :     bad_weak_ptr() _NOEXCEPT = default;</a>
<a name="2456"><span class="lineNum">    2456 </span>                :            :     bad_weak_ptr(const bad_weak_ptr&amp;) _NOEXCEPT = default;</a>
<a name="2457"><span class="lineNum">    2457 </span>                :            :     virtual ~bad_weak_ptr() _NOEXCEPT;</a>
<a name="2458"><span class="lineNum">    2458 </span>                :            :     virtual const char* what() const  _NOEXCEPT;</a>
<a name="2459"><span class="lineNum">    2459 </span>                :            : };</a>
<a name="2460"><span class="lineNum">    2460 </span>                :            : </a>
<a name="2461"><span class="lineNum">    2461 </span>                :            : _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="2462"><span class="lineNum">    2462 </span>                :            : void __throw_bad_weak_ptr()</a>
<a name="2463"><span class="lineNum">    2463 </span>                :            : {</a>
<a name="2464"><span class="lineNum">    2464 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="2465"><span class="lineNum">    2465 </span>                :            :     throw bad_weak_ptr();</a>
<a name="2466"><span class="lineNum">    2466 </span>                :            : #else</a>
<a name="2467"><span class="lineNum">    2467 </span>                :            :     _VSTD::abort();</a>
<a name="2468"><span class="lineNum">    2468 </span>                :            : #endif</a>
<a name="2469"><span class="lineNum">    2469 </span>                :            : }</a>
<a name="2470"><span class="lineNum">    2470 </span>                :            : </a>
<a name="2471"><span class="lineNum">    2471 </span>                :            : template&lt;class _Tp&gt; class _LIBCPP_TEMPLATE_VIS weak_ptr;</a>
<a name="2472"><span class="lineNum">    2472 </span>                :            : </a>
<a name="2473"><span class="lineNum">    2473 </span>                :            : class _LIBCPP_TYPE_VIS __shared_count</a>
<a name="2474"><span class="lineNum">    2474 </span>                :            : {</a>
<a name="2475"><span class="lineNum">    2475 </span>                :            :     __shared_count(const __shared_count&amp;);</a>
<a name="2476"><span class="lineNum">    2476 </span>                :            :     __shared_count&amp; operator=(const __shared_count&amp;);</a>
<a name="2477"><span class="lineNum">    2477 </span>                :            : </a>
<a name="2478"><span class="lineNum">    2478 </span>                :            : protected:</a>
<a name="2479"><span class="lineNum">    2479 </span>                :            :     long __shared_owners_;</a>
<a name="2480"><span class="lineNum">    2480 </span>                :            :     virtual ~__shared_count();</a>
<a name="2481"><span class="lineNum">    2481 </span>                :            : private:</a>
<a name="2482"><span class="lineNum">    2482 </span>                :            :     virtual void __on_zero_shared() _NOEXCEPT = 0;</a>
<a name="2483"><span class="lineNum">    2483 </span>                :            : </a>
<a name="2484"><span class="lineNum">    2484 </span>                :            : public:</a>
<a name="2485"><span class="lineNum">    2485 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2486"><span class="lineNum">    2486 </span>                :            :     explicit __shared_count(long __refs = 0) _NOEXCEPT</a>
<a name="2487"><span class="lineNum">    2487 </span>                :            :         : __shared_owners_(__refs) {}</a>
<a name="2488"><span class="lineNum">    2488 </span>                :            : </a>
<a name="2489"><span class="lineNum">    2489 </span>                :            : #if defined(_LIBCPP_BUILDING_LIBRARY) &amp;&amp; \</a>
<a name="2490"><span class="lineNum">    2490 </span>                :            :     defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)</a>
<a name="2491"><span class="lineNum">    2491 </span>                :            :     void __add_shared() _NOEXCEPT;</a>
<a name="2492"><span class="lineNum">    2492 </span>                :            :     bool __release_shared() _NOEXCEPT;</a>
<a name="2493"><span class="lineNum">    2493 </span>                :            : #else</a>
<a name="2494"><span class="lineNum">    2494 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2495"><span class="lineNum">    2495 </span>                :            :     void __add_shared() _NOEXCEPT {</a>
<a name="2496"><span class="lineNum">    2496 </span>                :            :       __libcpp_atomic_refcount_increment(__shared_owners_);</a>
<a name="2497"><span class="lineNum">    2497 </span>                :            :     }</a>
<a name="2498"><span class="lineNum">    2498 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2499"><span class="lineNum">    2499 </span>                :            :     bool __release_shared() _NOEXCEPT {</a>
<a name="2500"><span class="lineNum">    2500 </span>                :            :       if (__libcpp_atomic_refcount_decrement(__shared_owners_) == -1) {</a>
<a name="2501"><span class="lineNum">    2501 </span>                :            :         __on_zero_shared();</a>
<a name="2502"><span class="lineNum">    2502 </span>                :            :         return true;</a>
<a name="2503"><span class="lineNum">    2503 </span>                :            :       }</a>
<a name="2504"><span class="lineNum">    2504 </span>                :            :       return false;</a>
<a name="2505"><span class="lineNum">    2505 </span>                :            :     }</a>
<a name="2506"><span class="lineNum">    2506 </span>                :            : #endif</a>
<a name="2507"><span class="lineNum">    2507 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2508"><span class="lineNum">    2508 </span>                :            :     long use_count() const _NOEXCEPT {</a>
<a name="2509"><span class="lineNum">    2509 </span>                :            :         return __libcpp_relaxed_load(&amp;__shared_owners_) + 1;</a>
<a name="2510"><span class="lineNum">    2510 </span>                :            :     }</a>
<a name="2511"><span class="lineNum">    2511 </span>                :            : };</a>
<a name="2512"><span class="lineNum">    2512 </span>                :            : </a>
<a name="2513"><span class="lineNum">    2513 </span>                :            : class _LIBCPP_TYPE_VIS __shared_weak_count</a>
<a name="2514"><span class="lineNum">    2514 </span>                :            :     : private __shared_count</a>
<a name="2515"><span class="lineNum">    2515 </span>                :            : {</a>
<a name="2516"><span class="lineNum">    2516 </span>                :            :     long __shared_weak_owners_;</a>
<a name="2517"><span class="lineNum">    2517 </span>                :            : </a>
<a name="2518"><span class="lineNum">    2518 </span>                :            : public:</a>
<a name="2519"><span class="lineNum">    2519 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2520"><span class="lineNum">    2520 </span>                :            :     explicit __shared_weak_count(long __refs = 0) _NOEXCEPT</a>
<a name="2521"><span class="lineNum">    2521 </span>                :            :         : __shared_count(__refs),</a>
<a name="2522"><span class="lineNum">    2522 </span>                :            :           __shared_weak_owners_(__refs) {}</a>
<a name="2523"><span class="lineNum">    2523 </span>                :            : protected:</a>
<a name="2524"><span class="lineNum">    2524 </span>                :            :     virtual ~__shared_weak_count();</a>
<a name="2525"><span class="lineNum">    2525 </span>                :            : </a>
<a name="2526"><span class="lineNum">    2526 </span>                :            : public:</a>
<a name="2527"><span class="lineNum">    2527 </span>                :            : #if defined(_LIBCPP_BUILDING_LIBRARY) &amp;&amp; \</a>
<a name="2528"><span class="lineNum">    2528 </span>                :            :     defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)</a>
<a name="2529"><span class="lineNum">    2529 </span>                :            :     void __add_shared() _NOEXCEPT;</a>
<a name="2530"><span class="lineNum">    2530 </span>                :            :     void __add_weak() _NOEXCEPT;</a>
<a name="2531"><span class="lineNum">    2531 </span>                :            :     void __release_shared() _NOEXCEPT;</a>
<a name="2532"><span class="lineNum">    2532 </span>                :            : #else</a>
<a name="2533"><span class="lineNum">    2533 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2534"><span class="lineNum">    2534 </span>                :            :     void __add_shared() _NOEXCEPT {</a>
<a name="2535"><span class="lineNum">    2535 </span>                :            :       __shared_count::__add_shared();</a>
<a name="2536"><span class="lineNum">    2536 </span>                :            :     }</a>
<a name="2537"><span class="lineNum">    2537 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2538"><span class="lineNum">    2538 </span>                :            :     void __add_weak() _NOEXCEPT {</a>
<a name="2539"><span class="lineNum">    2539 </span>                :            :       __libcpp_atomic_refcount_increment(__shared_weak_owners_);</a>
<a name="2540"><span class="lineNum">    2540 </span>                :            :     }</a>
<a name="2541"><span class="lineNum">    2541 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2542"><span class="lineNum">    2542 </span>                :            :     void __release_shared() _NOEXCEPT {</a>
<a name="2543"><span class="lineNum">    2543 </span>                :            :       if (__shared_count::__release_shared())</a>
<a name="2544"><span class="lineNum">    2544 </span>                :            :         __release_weak();</a>
<a name="2545"><span class="lineNum">    2545 </span>                :            :     }</a>
<a name="2546"><span class="lineNum">    2546 </span>                :            : #endif</a>
<a name="2547"><span class="lineNum">    2547 </span>                :            :     void __release_weak() _NOEXCEPT;</a>
<a name="2548"><span class="lineNum">    2548 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2549"><span class="lineNum">    2549 </span>                :            :     long use_count() const _NOEXCEPT {return __shared_count::use_count();}</a>
<a name="2550"><span class="lineNum">    2550 </span>                :            :     __shared_weak_count* lock() _NOEXCEPT;</a>
<a name="2551"><span class="lineNum">    2551 </span>                :            : </a>
<a name="2552"><span class="lineNum">    2552 </span>                :            :     virtual const void* __get_deleter(const type_info&amp;) const _NOEXCEPT;</a>
<a name="2553"><span class="lineNum">    2553 </span>                :            : private:</a>
<a name="2554"><span class="lineNum">    2554 </span>                :            :     virtual void __on_zero_shared_weak() _NOEXCEPT = 0;</a>
<a name="2555"><span class="lineNum">    2555 </span>                :            : };</a>
<a name="2556"><span class="lineNum">    2556 </span>                :            : </a>
<a name="2557"><span class="lineNum">    2557 </span>                :            : template &lt;class _Tp, class _Dp, class _Alloc&gt;</a>
<a name="2558"><span class="lineNum">    2558 </span>                :            : class __shared_ptr_pointer</a>
<a name="2559"><span class="lineNum">    2559 </span>                :            :     : public __shared_weak_count</a>
<a name="2560"><span class="lineNum">    2560 </span>                :            : {</a>
<a name="2561"><span class="lineNum">    2561 </span>                :            :     __compressed_pair&lt;__compressed_pair&lt;_Tp, _Dp&gt;, _Alloc&gt; __data_;</a>
<a name="2562"><span class="lineNum">    2562 </span>                :            : public:</a>
<a name="2563"><span class="lineNum">    2563 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2564"><span class="lineNum">    2564 </span>                :            :     __shared_ptr_pointer(_Tp __p, _Dp __d, _Alloc __a)</a>
<a name="2565"><span class="lineNum">    2565 </span>                :            :         :  __data_(__compressed_pair&lt;_Tp, _Dp&gt;(__p, _VSTD::move(__d)), _VSTD::move(__a)) {}</a>
<a name="2566"><span class="lineNum">    2566 </span>                :            : </a>
<a name="2567"><span class="lineNum">    2567 </span>                :            : #ifndef _LIBCPP_NO_RTTI</a>
<a name="2568"><span class="lineNum">    2568 </span>                :            :     virtual const void* __get_deleter(const type_info&amp;) const _NOEXCEPT;</a>
<a name="2569"><span class="lineNum">    2569 </span>                :            : #endif</a>
<a name="2570"><span class="lineNum">    2570 </span>                :            : </a>
<a name="2571"><span class="lineNum">    2571 </span>                :            : private:</a>
<a name="2572"><span class="lineNum">    2572 </span>                :            :     virtual void __on_zero_shared() _NOEXCEPT;</a>
<a name="2573"><span class="lineNum">    2573 </span>                :            :     virtual void __on_zero_shared_weak() _NOEXCEPT;</a>
<a name="2574"><span class="lineNum">    2574 </span>                :            : };</a>
<a name="2575"><span class="lineNum">    2575 </span>                :            : </a>
<a name="2576"><span class="lineNum">    2576 </span>                :            : #ifndef _LIBCPP_NO_RTTI</a>
<a name="2577"><span class="lineNum">    2577 </span>                :            : </a>
<a name="2578"><span class="lineNum">    2578 </span>                :            : template &lt;class _Tp, class _Dp, class _Alloc&gt;</a>
<a name="2579"><span class="lineNum">    2579 </span>                :            : const void*</a>
<a name="2580"><span class="lineNum">    2580 </span>                :            : __shared_ptr_pointer&lt;_Tp, _Dp, _Alloc&gt;::__get_deleter(const type_info&amp; __t) const _NOEXCEPT</a>
<a name="2581"><span class="lineNum">    2581 </span>                :            : {</a>
<a name="2582"><span class="lineNum">    2582 </span>                :            :     return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : nullptr;</a>
<a name="2583"><span class="lineNum">    2583 </span>                :            : }</a>
<a name="2584"><span class="lineNum">    2584 </span>                :            : </a>
<a name="2585"><span class="lineNum">    2585 </span>                :            : #endif  // _LIBCPP_NO_RTTI</a>
<a name="2586"><span class="lineNum">    2586 </span>                :            : </a>
<a name="2587"><span class="lineNum">    2587 </span>                :            : template &lt;class _Tp, class _Dp, class _Alloc&gt;</a>
<a name="2588"><span class="lineNum">    2588 </span>                :            : void</a>
<a name="2589"><span class="lineNum">    2589 </span>                :            : __shared_ptr_pointer&lt;_Tp, _Dp, _Alloc&gt;::__on_zero_shared() _NOEXCEPT</a>
<a name="2590"><span class="lineNum">    2590 </span>                :            : {</a>
<a name="2591"><span class="lineNum">    2591 </span>                :            :     __data_.first().second()(__data_.first().first());</a>
<a name="2592"><span class="lineNum">    2592 </span>                :            :     __data_.first().second().~_Dp();</a>
<a name="2593"><span class="lineNum">    2593 </span>                :            : }</a>
<a name="2594"><span class="lineNum">    2594 </span>                :            : </a>
<a name="2595"><span class="lineNum">    2595 </span>                :            : template &lt;class _Tp, class _Dp, class _Alloc&gt;</a>
<a name="2596"><span class="lineNum">    2596 </span>                :            : void</a>
<a name="2597"><span class="lineNum">    2597 </span>                :            : __shared_ptr_pointer&lt;_Tp, _Dp, _Alloc&gt;::__on_zero_shared_weak() _NOEXCEPT</a>
<a name="2598"><span class="lineNum">    2598 </span>                :            : {</a>
<a name="2599"><span class="lineNum">    2599 </span>                :            :     typedef typename __allocator_traits_rebind&lt;_Alloc, __shared_ptr_pointer&gt;::type _Al;</a>
<a name="2600"><span class="lineNum">    2600 </span>                :            :     typedef allocator_traits&lt;_Al&gt; _ATraits;</a>
<a name="2601"><span class="lineNum">    2601 </span>                :            :     typedef pointer_traits&lt;typename _ATraits::pointer&gt; _PTraits;</a>
<a name="2602"><span class="lineNum">    2602 </span>                :            : </a>
<a name="2603"><span class="lineNum">    2603 </span>                :            :     _Al __a(__data_.second());</a>
<a name="2604"><span class="lineNum">    2604 </span>                :            :     __data_.second().~_Alloc();</a>
<a name="2605"><span class="lineNum">    2605 </span>                :            :     __a.deallocate(_PTraits::pointer_to(*this), 1);</a>
<a name="2606"><span class="lineNum">    2606 </span>                :            : }</a>
<a name="2607"><span class="lineNum">    2607 </span>                :            : </a>
<a name="2608"><span class="lineNum">    2608 </span>                :            : template &lt;class _Tp, class _Alloc&gt;</a>
<a name="2609"><span class="lineNum">    2609 </span>                :            : struct __shared_ptr_emplace</a>
<a name="2610"><span class="lineNum">    2610 </span>                :            :     : __shared_weak_count</a>
<a name="2611"><span class="lineNum">    2611 </span>                :            : {</a>
<a name="2612"><span class="lineNum">    2612 </span>                :            :     template&lt;class ..._Args&gt;</a>
<a name="2613"><span class="lineNum">    2613 </span>                :            :     _LIBCPP_HIDE_FROM_ABI</a>
<a name="2614"><span class="lineNum">    2614 </span>                :            :     explicit __shared_ptr_emplace(_Alloc __a, _Args&amp;&amp; ...__args)</a>
<a name="2615"><span class="lineNum">    2615 </span>                :            :         : __storage_(_VSTD::move(__a))</a>
<a name="2616"><span class="lineNum">    2616 </span>                :            :     {</a>
<a name="2617"><span class="lineNum">    2617 </span>                :            : #if _LIBCPP_STD_VER &gt; 17</a>
<a name="2618"><span class="lineNum">    2618 </span>                :            :         using _TpAlloc = typename __allocator_traits_rebind&lt;_Alloc, _Tp&gt;::type;</a>
<a name="2619"><span class="lineNum">    2619 </span>                :            :         _TpAlloc __tmp(*__get_alloc());</a>
<a name="2620"><span class="lineNum">    2620 </span>                :            :         allocator_traits&lt;_TpAlloc&gt;::construct(__tmp, __get_elem(), _VSTD::forward&lt;_Args&gt;(__args)...);</a>
<a name="2621"><span class="lineNum">    2621 </span>                :            : #else</a>
<a name="2622"><span class="lineNum">    2622 </span>                :            :         ::new ((void*)__get_elem()) _Tp(_VSTD::forward&lt;_Args&gt;(__args)...);</a>
<a name="2623"><span class="lineNum">    2623 </span>                :            : #endif</a>
<a name="2624"><span class="lineNum">    2624 </span>                :            :     }</a>
<a name="2625"><span class="lineNum">    2625 </span>                :            : </a>
<a name="2626"><span class="lineNum">    2626 </span>                :            :     _LIBCPP_HIDE_FROM_ABI</a>
<a name="2627"><span class="lineNum">    2627 </span>                :            :     _Alloc* __get_alloc() _NOEXCEPT { return __storage_.__get_alloc(); }</a>
<a name="2628"><span class="lineNum">    2628 </span>                :            : </a>
<a name="2629"><span class="lineNum">    2629 </span>                :            :     _LIBCPP_HIDE_FROM_ABI</a>
<a name="2630"><span class="lineNum">    2630 </span>                :            :     _Tp* __get_elem() _NOEXCEPT { return __storage_.__get_elem(); }</a>
<a name="2631"><span class="lineNum">    2631 </span>                :            : </a>
<a name="2632"><span class="lineNum">    2632 </span>                :            : private:</a>
<a name="2633"><span class="lineNum">    2633 </span>                :            :     virtual void __on_zero_shared() _NOEXCEPT {</a>
<a name="2634"><span class="lineNum">    2634 </span>                :            : #if _LIBCPP_STD_VER &gt; 17</a>
<a name="2635"><span class="lineNum">    2635 </span>                :            :         using _TpAlloc = typename __allocator_traits_rebind&lt;_Alloc, _Tp&gt;::type;</a>
<a name="2636"><span class="lineNum">    2636 </span>                :            :         _TpAlloc __tmp(*__get_alloc());</a>
<a name="2637"><span class="lineNum">    2637 </span>                :            :         allocator_traits&lt;_TpAlloc&gt;::destroy(__tmp, __get_elem());</a>
<a name="2638"><span class="lineNum">    2638 </span>                :            : #else</a>
<a name="2639"><span class="lineNum">    2639 </span>                :            :         __get_elem()-&gt;~_Tp();</a>
<a name="2640"><span class="lineNum">    2640 </span>                :            : #endif</a>
<a name="2641"><span class="lineNum">    2641 </span>                :            :     }</a>
<a name="2642"><span class="lineNum">    2642 </span>                :            : </a>
<a name="2643"><span class="lineNum">    2643 </span>                :            :     virtual void __on_zero_shared_weak() _NOEXCEPT {</a>
<a name="2644"><span class="lineNum">    2644 </span>                :            :         using _ControlBlockAlloc = typename __allocator_traits_rebind&lt;_Alloc, __shared_ptr_emplace&gt;::type;</a>
<a name="2645"><span class="lineNum">    2645 </span>                :            :         using _ControlBlockPointer = typename allocator_traits&lt;_ControlBlockAlloc&gt;::pointer;</a>
<a name="2646"><span class="lineNum">    2646 </span>                :            :         _ControlBlockAlloc __tmp(*__get_alloc());</a>
<a name="2647"><span class="lineNum">    2647 </span>                :            :         __storage_.~_Storage();</a>
<a name="2648"><span class="lineNum">    2648 </span>                :            :         allocator_traits&lt;_ControlBlockAlloc&gt;::deallocate(__tmp,</a>
<a name="2649"><span class="lineNum">    2649 </span>                :            :             pointer_traits&lt;_ControlBlockPointer&gt;::pointer_to(*this), 1);</a>
<a name="2650"><span class="lineNum">    2650 </span>                :            :     }</a>
<a name="2651"><span class="lineNum">    2651 </span>                :            : </a>
<a name="2652"><span class="lineNum">    2652 </span>                :            :     // This class implements the control block for non-array shared pointers created</a>
<a name="2653"><span class="lineNum">    2653 </span>                :            :     // through `std::allocate_shared` and `std::make_shared`.</a>
<a name="2654"><span class="lineNum">    2654 </span>                :            :     //</a>
<a name="2655"><span class="lineNum">    2655 </span>                :            :     // In previous versions of the library, we used a compressed pair to store</a>
<a name="2656"><span class="lineNum">    2656 </span>                :            :     // both the _Alloc and the _Tp. This implies using EBO, which is incompatible</a>
<a name="2657"><span class="lineNum">    2657 </span>                :            :     // with Allocator construction for _Tp. To allow implementing P0674 in C++20,</a>
<a name="2658"><span class="lineNum">    2658 </span>                :            :     // we now use a properly aligned char buffer while making sure that we maintain</a>
<a name="2659"><span class="lineNum">    2659 </span>                :            :     // the same layout that we had when we used a compressed pair.</a>
<a name="2660"><span class="lineNum">    2660 </span>                :            :     using _CompressedPair = __compressed_pair&lt;_Alloc, _Tp&gt;;</a>
<a name="2661"><span class="lineNum">    2661 </span>                :            :     struct _ALIGNAS_TYPE(_CompressedPair) _Storage {</a>
<a name="2662"><span class="lineNum">    2662 </span>                :            :         char __blob_[sizeof(_CompressedPair)];</a>
<a name="2663"><span class="lineNum">    2663 </span>                :            : </a>
<a name="2664"><span class="lineNum">    2664 </span>                :            :         _LIBCPP_HIDE_FROM_ABI explicit _Storage(_Alloc&amp;&amp; __a) {</a>
<a name="2665"><span class="lineNum">    2665 </span>                :            :             ::new ((void*)__get_alloc()) _Alloc(_VSTD::move(__a));</a>
<a name="2666"><span class="lineNum">    2666 </span>                :            :         }</a>
<a name="2667"><span class="lineNum">    2667 </span>                :            :         _LIBCPP_HIDE_FROM_ABI ~_Storage() {</a>
<a name="2668"><span class="lineNum">    2668 </span>                :            :             __get_alloc()-&gt;~_Alloc();</a>
<a name="2669"><span class="lineNum">    2669 </span>                :            :         }</a>
<a name="2670"><span class="lineNum">    2670 </span>                :            :         _Alloc* __get_alloc() _NOEXCEPT {</a>
<a name="2671"><span class="lineNum">    2671 </span>                :            :             _CompressedPair *__as_pair = reinterpret_cast&lt;_CompressedPair*&gt;(__blob_);</a>
<a name="2672"><span class="lineNum">    2672 </span>                :            :             typename _CompressedPair::_Base1* __first = _CompressedPair::__get_first_base(__as_pair);</a>
<a name="2673"><span class="lineNum">    2673 </span>                :            :             _Alloc *__alloc = reinterpret_cast&lt;_Alloc*&gt;(__first);</a>
<a name="2674"><span class="lineNum">    2674 </span>                :            :             return __alloc;</a>
<a name="2675"><span class="lineNum">    2675 </span>                :            :         }</a>
<a name="2676"><span class="lineNum">    2676 </span>                :            :         _LIBCPP_NO_CFI _Tp* __get_elem() _NOEXCEPT {</a>
<a name="2677"><span class="lineNum">    2677 </span>                :            :             _CompressedPair *__as_pair = reinterpret_cast&lt;_CompressedPair*&gt;(__blob_);</a>
<a name="2678"><span class="lineNum">    2678 </span>                :            :             typename _CompressedPair::_Base2* __second = _CompressedPair::__get_second_base(__as_pair);</a>
<a name="2679"><span class="lineNum">    2679 </span>                :            :             _Tp *__elem = reinterpret_cast&lt;_Tp*&gt;(__second);</a>
<a name="2680"><span class="lineNum">    2680 </span>                :            :             return __elem;</a>
<a name="2681"><span class="lineNum">    2681 </span>                :            :         }</a>
<a name="2682"><span class="lineNum">    2682 </span>                :            :     };</a>
<a name="2683"><span class="lineNum">    2683 </span>                :            : </a>
<a name="2684"><span class="lineNum">    2684 </span>                :            :     static_assert(_LIBCPP_ALIGNOF(_Storage) == _LIBCPP_ALIGNOF(_CompressedPair), &quot;&quot;);</a>
<a name="2685"><span class="lineNum">    2685 </span>                :            :     static_assert(sizeof(_Storage) == sizeof(_CompressedPair), &quot;&quot;);</a>
<a name="2686"><span class="lineNum">    2686 </span>                :            :     _Storage __storage_;</a>
<a name="2687"><span class="lineNum">    2687 </span>                :            : };</a>
<a name="2688"><span class="lineNum">    2688 </span>                :            : </a>
<a name="2689"><span class="lineNum">    2689 </span>                :            : struct __shared_ptr_dummy_rebind_allocator_type;</a>
<a name="2690"><span class="lineNum">    2690 </span>                :            : template &lt;&gt;</a>
<a name="2691"><span class="lineNum">    2691 </span>                :            : class _LIBCPP_TEMPLATE_VIS allocator&lt;__shared_ptr_dummy_rebind_allocator_type&gt;</a>
<a name="2692"><span class="lineNum">    2692 </span>                :            : {</a>
<a name="2693"><span class="lineNum">    2693 </span>                :            : public:</a>
<a name="2694"><span class="lineNum">    2694 </span>                :            :     template &lt;class _Other&gt;</a>
<a name="2695"><span class="lineNum">    2695 </span>                :            :     struct rebind</a>
<a name="2696"><span class="lineNum">    2696 </span>                :            :     {</a>
<a name="2697"><span class="lineNum">    2697 </span>                :            :         typedef allocator&lt;_Other&gt; other;</a>
<a name="2698"><span class="lineNum">    2698 </span>                :            :     };</a>
<a name="2699"><span class="lineNum">    2699 </span>                :            : };</a>
<a name="2700"><span class="lineNum">    2700 </span>                :            : </a>
<a name="2701"><span class="lineNum">    2701 </span>                :            : template&lt;class _Tp&gt; class _LIBCPP_TEMPLATE_VIS enable_shared_from_this;</a>
<a name="2702"><span class="lineNum">    2702 </span>                :            : </a>
<a name="2703"><span class="lineNum">    2703 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="2704"><span class="lineNum">    2704 </span>                :            : struct __compatible_with</a>
<a name="2705"><span class="lineNum">    2705 </span>                :            : #if _LIBCPP_STD_VER &gt; 14</a>
<a name="2706"><span class="lineNum">    2706 </span>                :            :     : is_convertible&lt;remove_extent_t&lt;_Tp&gt;*, remove_extent_t&lt;_Up&gt;*&gt; {};</a>
<a name="2707"><span class="lineNum">    2707 </span>                :            : #else</a>
<a name="2708"><span class="lineNum">    2708 </span>                :            :     : is_convertible&lt;_Tp*, _Up*&gt; {};</a>
<a name="2709"><span class="lineNum">    2709 </span>                :            : #endif // _LIBCPP_STD_VER &gt; 14</a>
<a name="2710"><span class="lineNum">    2710 </span>                :            : </a>
<a name="2711"><span class="lineNum">    2711 </span>                :            : #if defined(_LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI)</a>
<a name="2712"><span class="lineNum">    2712 </span>                :            : #  define _LIBCPP_SHARED_PTR_TRIVIAL_ABI __attribute__((trivial_abi))</a>
<a name="2713"><span class="lineNum">    2713 </span>                :            : #else</a>
<a name="2714"><span class="lineNum">    2714 </span>                :            : #  define _LIBCPP_SHARED_PTR_TRIVIAL_ABI</a>
<a name="2715"><span class="lineNum">    2715 </span>                :            : #endif</a>
<a name="2716"><span class="lineNum">    2716 </span>                :            : </a>
<a name="2717"><span class="lineNum">    2717 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="2718"><span class="lineNum">    2718 </span>                :            : class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr</a>
<a name="2719"><span class="lineNum">    2719 </span>                :            : {</a>
<a name="2720"><span class="lineNum">    2720 </span>                :            : public:</a>
<a name="2721"><span class="lineNum">    2721 </span>                :            : #if _LIBCPP_STD_VER &gt; 14</a>
<a name="2722"><span class="lineNum">    2722 </span>                :            :     typedef weak_ptr&lt;_Tp&gt; weak_type;</a>
<a name="2723"><span class="lineNum">    2723 </span>                :            :     typedef remove_extent_t&lt;_Tp&gt; element_type;</a>
<a name="2724"><span class="lineNum">    2724 </span>                :            : #else</a>
<a name="2725"><span class="lineNum">    2725 </span>                :            :     typedef _Tp element_type;</a>
<a name="2726"><span class="lineNum">    2726 </span>                :            : #endif</a>
<a name="2727"><span class="lineNum">    2727 </span>                :            : </a>
<a name="2728"><span class="lineNum">    2728 </span>                :            : private:</a>
<a name="2729"><span class="lineNum">    2729 </span>                :            :     element_type*      __ptr_;</a>
<a name="2730"><span class="lineNum">    2730 </span>                :            :     __shared_weak_count* __cntrl_;</a>
<a name="2731"><span class="lineNum">    2731 </span>                :            : </a>
<a name="2732"><span class="lineNum">    2732 </span>                :            :     struct __nat {int __for_bool_;};</a>
<a name="2733"><span class="lineNum">    2733 </span>                :            : public:</a>
<a name="2734"><span class="lineNum">    2734 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2735"><span class="lineNum">    2735 </span>                :            :     _LIBCPP_CONSTEXPR shared_ptr() _NOEXCEPT;</a>
<a name="2736"><span class="lineNum">    2736 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2737"><span class="lineNum">    2737 </span>                :            :     _LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT;</a>
<a name="2738"><span class="lineNum">    2738 </span>                :            :     template&lt;class _Yp&gt;</a>
<a name="2739"><span class="lineNum">    2739 </span>                :            :         explicit shared_ptr(_Yp* __p,</a>
<a name="2740"><span class="lineNum">    2740 </span>                :            :                             typename enable_if&lt;__compatible_with&lt;_Yp, element_type&gt;::value, __nat&gt;::type = __nat());</a>
<a name="2741"><span class="lineNum">    2741 </span>                :            :     template&lt;class _Yp, class _Dp&gt;</a>
<a name="2742"><span class="lineNum">    2742 </span>                :            :         shared_ptr(_Yp* __p, _Dp __d,</a>
<a name="2743"><span class="lineNum">    2743 </span>                :            :                    typename enable_if&lt;__compatible_with&lt;_Yp, element_type&gt;::value, __nat&gt;::type = __nat());</a>
<a name="2744"><span class="lineNum">    2744 </span>                :            :     template&lt;class _Yp, class _Dp, class _Alloc&gt;</a>
<a name="2745"><span class="lineNum">    2745 </span>                :            :         shared_ptr(_Yp* __p, _Dp __d, _Alloc __a,</a>
<a name="2746"><span class="lineNum">    2746 </span>                :            :                    typename enable_if&lt;__compatible_with&lt;_Yp, element_type&gt;::value, __nat&gt;::type = __nat());</a>
<a name="2747"><span class="lineNum">    2747 </span>                :            :     template &lt;class _Dp&gt; shared_ptr(nullptr_t __p, _Dp __d);</a>
<a name="2748"><span class="lineNum">    2748 </span>                :            :     template &lt;class _Dp, class _Alloc&gt; shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a);</a>
<a name="2749"><span class="lineNum">    2749 </span>                :            :     template&lt;class _Yp&gt; _LIBCPP_INLINE_VISIBILITY shared_ptr(const shared_ptr&lt;_Yp&gt;&amp; __r, element_type* __p) _NOEXCEPT;</a>
<a name="2750"><span class="lineNum">    2750 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2751"><span class="lineNum">    2751 </span>                :            :     shared_ptr(const shared_ptr&amp; __r) _NOEXCEPT;</a>
<a name="2752"><span class="lineNum">    2752 </span>                :            :     template&lt;class _Yp&gt;</a>
<a name="2753"><span class="lineNum">    2753 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2754"><span class="lineNum">    2754 </span>                :            :         shared_ptr(const shared_ptr&lt;_Yp&gt;&amp; __r,</a>
<a name="2755"><span class="lineNum">    2755 </span>                :            :                    typename enable_if&lt;__compatible_with&lt;_Yp, element_type&gt;::value, __nat&gt;::type = __nat())</a>
<a name="2756"><span class="lineNum">    2756 </span>                :            :                        _NOEXCEPT;</a>
<a name="2757"><span class="lineNum">    2757 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2758"><span class="lineNum">    2758 </span>                :            :     shared_ptr(shared_ptr&amp;&amp; __r) _NOEXCEPT;</a>
<a name="2759"><span class="lineNum">    2759 </span>                :            :     template&lt;class _Yp&gt; _LIBCPP_INLINE_VISIBILITY  shared_ptr(shared_ptr&lt;_Yp&gt;&amp;&amp; __r,</a>
<a name="2760"><span class="lineNum">    2760 </span>                :            :                    typename enable_if&lt;__compatible_with&lt;_Yp, element_type&gt;::value, __nat&gt;::type = __nat())</a>
<a name="2761"><span class="lineNum">    2761 </span>                :            :                        _NOEXCEPT;</a>
<a name="2762"><span class="lineNum">    2762 </span>                :            :     template&lt;class _Yp&gt; explicit shared_ptr(const weak_ptr&lt;_Yp&gt;&amp; __r,</a>
<a name="2763"><span class="lineNum">    2763 </span>                :            :                    typename enable_if&lt;is_convertible&lt;_Yp*, element_type*&gt;::value, __nat&gt;::type= __nat());</a>
<a name="2764"><span class="lineNum">    2764 </span>                :            : #if _LIBCPP_STD_VER &lt;= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)</a>
<a name="2765"><span class="lineNum">    2765 </span>                :            :     template&lt;class _Yp&gt;</a>
<a name="2766"><span class="lineNum">    2766 </span>                :            :         shared_ptr(auto_ptr&lt;_Yp&gt;&amp;&amp; __r,</a>
<a name="2767"><span class="lineNum">    2767 </span>                :            :                    typename enable_if&lt;is_convertible&lt;_Yp*, element_type*&gt;::value, __nat&gt;::type = __nat());</a>
<a name="2768"><span class="lineNum">    2768 </span>                :            : #endif</a>
<a name="2769"><span class="lineNum">    2769 </span>                :            :     template &lt;class _Yp, class _Dp&gt;</a>
<a name="2770"><span class="lineNum">    2770 </span>                :            :         shared_ptr(unique_ptr&lt;_Yp, _Dp&gt;&amp;&amp;,</a>
<a name="2771"><span class="lineNum">    2771 </span>                :            :                    typename enable_if</a>
<a name="2772"><span class="lineNum">    2772 </span>                :            :                    &lt;</a>
<a name="2773"><span class="lineNum">    2773 </span>                :            :                        !is_lvalue_reference&lt;_Dp&gt;::value &amp;&amp;</a>
<a name="2774"><span class="lineNum">    2774 </span>                :            :                        is_convertible&lt;typename unique_ptr&lt;_Yp, _Dp&gt;::pointer, element_type*&gt;::value,</a>
<a name="2775"><span class="lineNum">    2775 </span>                :            :                        __nat</a>
<a name="2776"><span class="lineNum">    2776 </span>                :            :                    &gt;::type = __nat());</a>
<a name="2777"><span class="lineNum">    2777 </span>                :            :     template &lt;class _Yp, class _Dp&gt;</a>
<a name="2778"><span class="lineNum">    2778 </span>                :            :         shared_ptr(unique_ptr&lt;_Yp, _Dp&gt;&amp;&amp;,</a>
<a name="2779"><span class="lineNum">    2779 </span>                :            :                    typename enable_if</a>
<a name="2780"><span class="lineNum">    2780 </span>                :            :                    &lt;</a>
<a name="2781"><span class="lineNum">    2781 </span>                :            :                        is_lvalue_reference&lt;_Dp&gt;::value &amp;&amp;</a>
<a name="2782"><span class="lineNum">    2782 </span>                :            :                        is_convertible&lt;typename unique_ptr&lt;_Yp, _Dp&gt;::pointer, element_type*&gt;::value,</a>
<a name="2783"><span class="lineNum">    2783 </span>                :            :                        __nat</a>
<a name="2784"><span class="lineNum">    2784 </span>                :            :                    &gt;::type = __nat());</a>
<a name="2785"><span class="lineNum">    2785 </span>                :            : </a>
<a name="2786"><span class="lineNum">    2786 </span>                :            :     ~shared_ptr();</a>
<a name="2787"><span class="lineNum">    2787 </span>                :            : </a>
<a name="2788"><span class="lineNum">    2788 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2789"><span class="lineNum">    2789 </span>                :            :     shared_ptr&amp; operator=(const shared_ptr&amp; __r) _NOEXCEPT;</a>
<a name="2790"><span class="lineNum">    2790 </span>                :            :     template&lt;class _Yp&gt;</a>
<a name="2791"><span class="lineNum">    2791 </span>                :            :         typename enable_if</a>
<a name="2792"><span class="lineNum">    2792 </span>                :            :         &lt;</a>
<a name="2793"><span class="lineNum">    2793 </span>                :            :             __compatible_with&lt;_Yp, element_type&gt;::value,</a>
<a name="2794"><span class="lineNum">    2794 </span>                :            :             shared_ptr&amp;</a>
<a name="2795"><span class="lineNum">    2795 </span>                :            :         &gt;::type</a>
<a name="2796"><span class="lineNum">    2796 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2797"><span class="lineNum">    2797 </span>                :            :         operator=(const shared_ptr&lt;_Yp&gt;&amp; __r) _NOEXCEPT;</a>
<a name="2798"><span class="lineNum">    2798 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2799"><span class="lineNum">    2799 </span>                :            :     shared_ptr&amp; operator=(shared_ptr&amp;&amp; __r) _NOEXCEPT;</a>
<a name="2800"><span class="lineNum">    2800 </span>                :            :     template&lt;class _Yp&gt;</a>
<a name="2801"><span class="lineNum">    2801 </span>                :            :         typename enable_if</a>
<a name="2802"><span class="lineNum">    2802 </span>                :            :         &lt;</a>
<a name="2803"><span class="lineNum">    2803 </span>                :            :             __compatible_with&lt;_Yp, element_type&gt;::value,</a>
<a name="2804"><span class="lineNum">    2804 </span>                :            :             shared_ptr&amp;</a>
<a name="2805"><span class="lineNum">    2805 </span>                :            :         &gt;::type</a>
<a name="2806"><span class="lineNum">    2806 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2807"><span class="lineNum">    2807 </span>                :            :         operator=(shared_ptr&lt;_Yp&gt;&amp;&amp; __r);</a>
<a name="2808"><span class="lineNum">    2808 </span>                :            : #if _LIBCPP_STD_VER &lt;= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)</a>
<a name="2809"><span class="lineNum">    2809 </span>                :            :     template&lt;class _Yp&gt;</a>
<a name="2810"><span class="lineNum">    2810 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2811"><span class="lineNum">    2811 </span>                :            :         typename enable_if</a>
<a name="2812"><span class="lineNum">    2812 </span>                :            :         &lt;</a>
<a name="2813"><span class="lineNum">    2813 </span>                :            :             !is_array&lt;_Yp&gt;::value &amp;&amp;</a>
<a name="2814"><span class="lineNum">    2814 </span>                :            :             is_convertible&lt;_Yp*, element_type*&gt;::value,</a>
<a name="2815"><span class="lineNum">    2815 </span>                :            :             shared_ptr</a>
<a name="2816"><span class="lineNum">    2816 </span>                :            :         &gt;::type&amp;</a>
<a name="2817"><span class="lineNum">    2817 </span>                :            :         operator=(auto_ptr&lt;_Yp&gt;&amp;&amp; __r);</a>
<a name="2818"><span class="lineNum">    2818 </span>                :            : #endif</a>
<a name="2819"><span class="lineNum">    2819 </span>                :            :     template &lt;class _Yp, class _Dp&gt;</a>
<a name="2820"><span class="lineNum">    2820 </span>                :            :         typename enable_if</a>
<a name="2821"><span class="lineNum">    2821 </span>                :            :         &lt;</a>
<a name="2822"><span class="lineNum">    2822 </span>                :            :             is_convertible&lt;typename unique_ptr&lt;_Yp, _Dp&gt;::pointer, element_type*&gt;::value,</a>
<a name="2823"><span class="lineNum">    2823 </span>                :            :             shared_ptr&amp;</a>
<a name="2824"><span class="lineNum">    2824 </span>                :            :         &gt;::type</a>
<a name="2825"><span class="lineNum">    2825 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2826"><span class="lineNum">    2826 </span>                :            :         operator=(unique_ptr&lt;_Yp, _Dp&gt;&amp;&amp; __r);</a>
<a name="2827"><span class="lineNum">    2827 </span>                :            : </a>
<a name="2828"><span class="lineNum">    2828 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2829"><span class="lineNum">    2829 </span>                :            :     void swap(shared_ptr&amp; __r) _NOEXCEPT;</a>
<a name="2830"><span class="lineNum">    2830 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2831"><span class="lineNum">    2831 </span>                :            :     void reset() _NOEXCEPT;</a>
<a name="2832"><span class="lineNum">    2832 </span>                :            :     template&lt;class _Yp&gt;</a>
<a name="2833"><span class="lineNum">    2833 </span>                :            :         typename enable_if</a>
<a name="2834"><span class="lineNum">    2834 </span>                :            :         &lt;</a>
<a name="2835"><span class="lineNum">    2835 </span>                :            :             __compatible_with&lt;_Yp, element_type&gt;::value,</a>
<a name="2836"><span class="lineNum">    2836 </span>                :            :             void</a>
<a name="2837"><span class="lineNum">    2837 </span>                :            :         &gt;::type</a>
<a name="2838"><span class="lineNum">    2838 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2839"><span class="lineNum">    2839 </span>                :            :         reset(_Yp* __p);</a>
<a name="2840"><span class="lineNum">    2840 </span>                :            :     template&lt;class _Yp, class _Dp&gt;</a>
<a name="2841"><span class="lineNum">    2841 </span>                :            :         typename enable_if</a>
<a name="2842"><span class="lineNum">    2842 </span>                :            :         &lt;</a>
<a name="2843"><span class="lineNum">    2843 </span>                :            :             __compatible_with&lt;_Yp, element_type&gt;::value,</a>
<a name="2844"><span class="lineNum">    2844 </span>                :            :             void</a>
<a name="2845"><span class="lineNum">    2845 </span>                :            :         &gt;::type</a>
<a name="2846"><span class="lineNum">    2846 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2847"><span class="lineNum">    2847 </span>                :            :         reset(_Yp* __p, _Dp __d);</a>
<a name="2848"><span class="lineNum">    2848 </span>                :            :     template&lt;class _Yp, class _Dp, class _Alloc&gt;</a>
<a name="2849"><span class="lineNum">    2849 </span>                :            :         typename enable_if</a>
<a name="2850"><span class="lineNum">    2850 </span>                :            :         &lt;</a>
<a name="2851"><span class="lineNum">    2851 </span>                :            :             __compatible_with&lt;_Yp, element_type&gt;::value,</a>
<a name="2852"><span class="lineNum">    2852 </span>                :            :             void</a>
<a name="2853"><span class="lineNum">    2853 </span>                :            :         &gt;::type</a>
<a name="2854"><span class="lineNum">    2854 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2855"><span class="lineNum">    2855 </span>                :            :         reset(_Yp* __p, _Dp __d, _Alloc __a);</a>
<a name="2856"><span class="lineNum">    2856 </span>                :            : </a>
<a name="2857"><span class="lineNum">    2857 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2858"><span class="lineNum">    2858 </span>                :            :     element_type* get() const _NOEXCEPT {return __ptr_;}</a>
<a name="2859"><span class="lineNum">    2859 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2860"><span class="lineNum">    2860 </span>                :            :     typename add_lvalue_reference&lt;element_type&gt;::type operator*() const _NOEXCEPT</a>
<a name="2861"><span class="lineNum">    2861 </span>                :            :         {return *__ptr_;}</a>
<a name="2862"><span class="lineNum">    2862 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2863"><span class="lineNum">    2863 </span>                :            :     element_type* operator-&gt;() const _NOEXCEPT</a>
<a name="2864"><span class="lineNum">    2864 </span>                :            :     {</a>
<a name="2865"><span class="lineNum">    2865 </span>                :            :         static_assert(!_VSTD::is_array&lt;_Tp&gt;::value,</a>
<a name="2866"><span class="lineNum">    2866 </span>                :            :                       &quot;std::shared_ptr&lt;T&gt;::operator-&gt; is only valid when T is not an array type.&quot;);</a>
<a name="2867"><span class="lineNum">    2867 </span>                :            :         return __ptr_;</a>
<a name="2868"><span class="lineNum">    2868 </span>                :            :     }</a>
<a name="2869"><span class="lineNum">    2869 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2870"><span class="lineNum">    2870 </span>                :            :     long use_count() const _NOEXCEPT {return __cntrl_ ? __cntrl_-&gt;use_count() : 0;}</a>
<a name="2871"><span class="lineNum">    2871 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2872"><span class="lineNum">    2872 </span>                :            :     bool unique() const _NOEXCEPT {return use_count() == 1;}</a>
<a name="2873"><span class="lineNum">    2873 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2874"><span class="lineNum">    2874 </span>                :            :     _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT {return get() != nullptr;}</a>
<a name="2875"><span class="lineNum">    2875 </span>                :            :     template &lt;class _Up&gt;</a>
<a name="2876"><span class="lineNum">    2876 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2877"><span class="lineNum">    2877 </span>                :            :         bool owner_before(shared_ptr&lt;_Up&gt; const&amp; __p) const _NOEXCEPT</a>
<a name="2878"><span class="lineNum">    2878 </span>                :            :         {return __cntrl_ &lt; __p.__cntrl_;}</a>
<a name="2879"><span class="lineNum">    2879 </span>                :            :     template &lt;class _Up&gt;</a>
<a name="2880"><span class="lineNum">    2880 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2881"><span class="lineNum">    2881 </span>                :            :         bool owner_before(weak_ptr&lt;_Up&gt; const&amp; __p) const _NOEXCEPT</a>
<a name="2882"><span class="lineNum">    2882 </span>                :            :         {return __cntrl_ &lt; __p.__cntrl_;}</a>
<a name="2883"><span class="lineNum">    2883 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2884"><span class="lineNum">    2884 </span>                :            :     bool</a>
<a name="2885"><span class="lineNum">    2885 </span>                :            :     __owner_equivalent(const shared_ptr&amp; __p) const</a>
<a name="2886"><span class="lineNum">    2886 </span>                :            :         {return __cntrl_ == __p.__cntrl_;}</a>
<a name="2887"><span class="lineNum">    2887 </span>                :            : </a>
<a name="2888"><span class="lineNum">    2888 </span>                :            : #if _LIBCPP_STD_VER &gt; 14</a>
<a name="2889"><span class="lineNum">    2889 </span>                :            :     typename add_lvalue_reference&lt;element_type&gt;::type</a>
<a name="2890"><span class="lineNum">    2890 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="2891"><span class="lineNum">    2891 </span>                :            :     operator[](ptrdiff_t __i) const</a>
<a name="2892"><span class="lineNum">    2892 </span>                :            :     {</a>
<a name="2893"><span class="lineNum">    2893 </span>                :            :             static_assert(_VSTD::is_array&lt;_Tp&gt;::value,</a>
<a name="2894"><span class="lineNum">    2894 </span>                :            :                           &quot;std::shared_ptr&lt;T&gt;::operator[] is only valid when T is an array type.&quot;);</a>
<a name="2895"><span class="lineNum">    2895 </span>                :            :             return __ptr_[__i];</a>
<a name="2896"><span class="lineNum">    2896 </span>                :            :     }</a>
<a name="2897"><span class="lineNum">    2897 </span>                :            : #endif</a>
<a name="2898"><span class="lineNum">    2898 </span>                :            : </a>
<a name="2899"><span class="lineNum">    2899 </span>                :            : #ifndef _LIBCPP_NO_RTTI</a>
<a name="2900"><span class="lineNum">    2900 </span>                :            :     template &lt;class _Dp&gt;</a>
<a name="2901"><span class="lineNum">    2901 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2902"><span class="lineNum">    2902 </span>                :            :         _Dp* __get_deleter() const _NOEXCEPT</a>
<a name="2903"><span class="lineNum">    2903 </span>                :            :             {return static_cast&lt;_Dp*&gt;(__cntrl_</a>
<a name="2904"><span class="lineNum">    2904 </span>                :            :                     ? const_cast&lt;void *&gt;(__cntrl_-&gt;__get_deleter(typeid(_Dp)))</a>
<a name="2905"><span class="lineNum">    2905 </span>                :            :                       : nullptr);}</a>
<a name="2906"><span class="lineNum">    2906 </span>                :            : #endif  // _LIBCPP_NO_RTTI</a>
<a name="2907"><span class="lineNum">    2907 </span>                :            : </a>
<a name="2908"><span class="lineNum">    2908 </span>                :            :     template&lt;class _Yp, class _CntrlBlk&gt;</a>
<a name="2909"><span class="lineNum">    2909 </span>                :            :     static shared_ptr&lt;_Tp&gt;</a>
<a name="2910"><span class="lineNum">    2910 </span>                :            :     __create_with_control_block(_Yp* __p, _CntrlBlk* __cntrl) _NOEXCEPT</a>
<a name="2911"><span class="lineNum">    2911 </span>                :            :     {</a>
<a name="2912"><span class="lineNum">    2912 </span>                :            :         shared_ptr&lt;_Tp&gt; __r;</a>
<a name="2913"><span class="lineNum">    2913 </span>                :            :         __r.__ptr_ = __p;</a>
<a name="2914"><span class="lineNum">    2914 </span>                :            :         __r.__cntrl_ = __cntrl;</a>
<a name="2915"><span class="lineNum">    2915 </span>                :            :         __r.__enable_weak_this(__r.__ptr_, __r.__ptr_);</a>
<a name="2916"><span class="lineNum">    2916 </span>                :            :         return __r;</a>
<a name="2917"><span class="lineNum">    2917 </span>                :            :     }</a>
<a name="2918"><span class="lineNum">    2918 </span>                :            : </a>
<a name="2919"><span class="lineNum">    2919 </span>                :            : private:</a>
<a name="2920"><span class="lineNum">    2920 </span>                :            :     template &lt;class _Yp, bool = is_function&lt;_Yp&gt;::value&gt;</a>
<a name="2921"><span class="lineNum">    2921 </span>                :            :         struct __shared_ptr_default_allocator</a>
<a name="2922"><span class="lineNum">    2922 </span>                :            :         {</a>
<a name="2923"><span class="lineNum">    2923 </span>                :            :             typedef allocator&lt;_Yp&gt; type;</a>
<a name="2924"><span class="lineNum">    2924 </span>                :            :         };</a>
<a name="2925"><span class="lineNum">    2925 </span>                :            : </a>
<a name="2926"><span class="lineNum">    2926 </span>                :            :     template &lt;class _Yp&gt;</a>
<a name="2927"><span class="lineNum">    2927 </span>                :            :         struct __shared_ptr_default_allocator&lt;_Yp, true&gt;</a>
<a name="2928"><span class="lineNum">    2928 </span>                :            :         {</a>
<a name="2929"><span class="lineNum">    2929 </span>                :            :             typedef allocator&lt;__shared_ptr_dummy_rebind_allocator_type&gt; type;</a>
<a name="2930"><span class="lineNum">    2930 </span>                :            :         };</a>
<a name="2931"><span class="lineNum">    2931 </span>                :            : </a>
<a name="2932"><span class="lineNum">    2932 </span>                :            :     template &lt;class _Yp, class _OrigPtr&gt;</a>
<a name="2933"><span class="lineNum">    2933 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="2934"><span class="lineNum">    2934 </span>                :            :         typename enable_if&lt;is_convertible&lt;_OrigPtr*,</a>
<a name="2935"><span class="lineNum">    2935 </span>                :            :                                           const enable_shared_from_this&lt;_Yp&gt;*</a>
<a name="2936"><span class="lineNum">    2936 </span>                :            :         &gt;::value,</a>
<a name="2937"><span class="lineNum">    2937 </span>                :            :             void&gt;::type</a>
<a name="2938"><span class="lineNum">    2938 </span>                :            :         __enable_weak_this(const enable_shared_from_this&lt;_Yp&gt;* __e,</a>
<a name="2939"><span class="lineNum">    2939 </span>                :            :                            _OrigPtr* __ptr) _NOEXCEPT</a>
<a name="2940"><span class="lineNum">    2940 </span>                :            :         {</a>
<a name="2941"><span class="lineNum">    2941 </span>                :            :             typedef typename remove_cv&lt;_Yp&gt;::type _RawYp;</a>
<a name="2942"><span class="lineNum">    2942 </span>                :            :             if (__e &amp;&amp; __e-&gt;__weak_this_.expired())</a>
<a name="2943"><span class="lineNum">    2943 </span>                :            :             {</a>
<a name="2944"><span class="lineNum">    2944 </span>                :            :                 __e-&gt;__weak_this_ = shared_ptr&lt;_RawYp&gt;(*this,</a>
<a name="2945"><span class="lineNum">    2945 </span>                :            :                     const_cast&lt;_RawYp*&gt;(static_cast&lt;const _Yp*&gt;(__ptr)));</a>
<a name="2946"><span class="lineNum">    2946 </span>                :            :             }</a>
<a name="2947"><span class="lineNum">    2947 </span>                :            :         }</a>
<a name="2948"><span class="lineNum">    2948 </span>                :            : </a>
<a name="2949"><span class="lineNum">    2949 </span>                :            :     _LIBCPP_INLINE_VISIBILITY void __enable_weak_this(...) _NOEXCEPT {}</a>
<a name="2950"><span class="lineNum">    2950 </span>                :            : </a>
<a name="2951"><span class="lineNum">    2951 </span>                :            :     template &lt;class, class _Yp&gt;</a>
<a name="2952"><span class="lineNum">    2952 </span>                :            :         struct __shared_ptr_default_delete</a>
<a name="2953"><span class="lineNum">    2953 </span>                :            :             : default_delete&lt;_Yp&gt; {};</a>
<a name="2954"><span class="lineNum">    2954 </span>                :            : </a>
<a name="2955"><span class="lineNum">    2955 </span>                :            :     template &lt;class _Yp, class _Un, size_t _Sz&gt;</a>
<a name="2956"><span class="lineNum">    2956 </span>                :            :         struct __shared_ptr_default_delete&lt;_Yp[_Sz], _Un&gt;</a>
<a name="2957"><span class="lineNum">    2957 </span>                :            :             : default_delete&lt;_Yp[]&gt; {};</a>
<a name="2958"><span class="lineNum">    2958 </span>                :            : </a>
<a name="2959"><span class="lineNum">    2959 </span>                :            :     template &lt;class _Yp, class _Un&gt;</a>
<a name="2960"><span class="lineNum">    2960 </span>                :            :         struct __shared_ptr_default_delete&lt;_Yp[], _Un&gt;</a>
<a name="2961"><span class="lineNum">    2961 </span>                :            :             : default_delete&lt;_Yp[]&gt; {};</a>
<a name="2962"><span class="lineNum">    2962 </span>                :            : </a>
<a name="2963"><span class="lineNum">    2963 </span>                :            :     template &lt;class _Up&gt; friend class _LIBCPP_TEMPLATE_VIS shared_ptr;</a>
<a name="2964"><span class="lineNum">    2964 </span>                :            :     template &lt;class _Up&gt; friend class _LIBCPP_TEMPLATE_VIS weak_ptr;</a>
<a name="2965"><span class="lineNum">    2965 </span>                :            : };</a>
<a name="2966"><span class="lineNum">    2966 </span>                :            : </a>
<a name="2967"><span class="lineNum">    2967 </span>                :            : #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES</a>
<a name="2968"><span class="lineNum">    2968 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="2969"><span class="lineNum">    2969 </span>                :            : shared_ptr(weak_ptr&lt;_Tp&gt;) -&gt; shared_ptr&lt;_Tp&gt;;</a>
<a name="2970"><span class="lineNum">    2970 </span>                :            : template&lt;class _Tp, class _Dp&gt;</a>
<a name="2971"><span class="lineNum">    2971 </span>                :            : shared_ptr(unique_ptr&lt;_Tp, _Dp&gt;) -&gt; shared_ptr&lt;_Tp&gt;;</a>
<a name="2972"><span class="lineNum">    2972 </span>                :            : #endif</a>
<a name="2973"><span class="lineNum">    2973 </span>                :            : </a>
<a name="2974"><span class="lineNum">    2974 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="2975"><span class="lineNum">    2975 </span>                :            : inline</a>
<a name="2976"><span class="lineNum">    2976 </span>                :            : _LIBCPP_CONSTEXPR</a>
<a name="2977"><span class="lineNum">    2977 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr() _NOEXCEPT</a>
<a name="2978"><span class="lineNum">    2978 </span>                :            :     : __ptr_(nullptr),</a>
<a name="2979"><span class="lineNum">    2979 </span>                :            :       __cntrl_(nullptr)</a>
<a name="2980"><span class="lineNum">    2980 </span>                :            : {</a>
<a name="2981"><span class="lineNum">    2981 </span>                :            : }</a>
<a name="2982"><span class="lineNum">    2982 </span>                :            : </a>
<a name="2983"><span class="lineNum">    2983 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="2984"><span class="lineNum">    2984 </span>                :            : inline</a>
<a name="2985"><span class="lineNum">    2985 </span>                :            : _LIBCPP_CONSTEXPR</a>
<a name="2986"><span class="lineNum">    2986 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(nullptr_t) _NOEXCEPT</a>
<a name="2987"><span class="lineNum">    2987 </span>                :            :     : __ptr_(nullptr),</a>
<a name="2988"><span class="lineNum">    2988 </span>                :            :       __cntrl_(nullptr)</a>
<a name="2989"><span class="lineNum">    2989 </span>                :            : {</a>
<a name="2990"><span class="lineNum">    2990 </span>                :            : }</a>
<a name="2991"><span class="lineNum">    2991 </span>                :            : </a>
<a name="2992"><span class="lineNum">    2992 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="2993"><span class="lineNum">    2993 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="2994"><span class="lineNum">    2994 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(_Yp* __p,</a>
<a name="2995"><span class="lineNum">    2995 </span>                :            :                             typename enable_if&lt;__compatible_with&lt;_Yp, element_type&gt;::value, __nat&gt;::type)</a>
<a name="2996"><span class="lineNum">    2996 </span>                :            :     : __ptr_(__p)</a>
<a name="2997"><span class="lineNum">    2997 </span>                :            : {</a>
<a name="2998"><span class="lineNum">    2998 </span>                :            :     unique_ptr&lt;_Yp&gt; __hold(__p);</a>
<a name="2999"><span class="lineNum">    2999 </span>                :            :     typedef typename __shared_ptr_default_allocator&lt;_Yp&gt;::type _AllocT;</a>
<a name="3000"><span class="lineNum">    3000 </span>                :            :     typedef __shared_ptr_pointer&lt;_Yp*, __shared_ptr_default_delete&lt;_Tp, _Yp&gt;, _AllocT &gt; _CntrlBlk;</a>
<a name="3001"><span class="lineNum">    3001 </span>                :            :     __cntrl_ = new _CntrlBlk(__p, __shared_ptr_default_delete&lt;_Tp, _Yp&gt;(), _AllocT());</a>
<a name="3002"><span class="lineNum">    3002 </span>                :            :     __hold.release();</a>
<a name="3003"><span class="lineNum">    3003 </span>                :            :     __enable_weak_this(__p, __p);</a>
<a name="3004"><span class="lineNum">    3004 </span>                :            : }</a>
<a name="3005"><span class="lineNum">    3005 </span>                :            : </a>
<a name="3006"><span class="lineNum">    3006 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3007"><span class="lineNum">    3007 </span>                :            : template&lt;class _Yp, class _Dp&gt;</a>
<a name="3008"><span class="lineNum">    3008 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(_Yp* __p, _Dp __d,</a>
<a name="3009"><span class="lineNum">    3009 </span>                :            :                             typename enable_if&lt;__compatible_with&lt;_Yp, element_type&gt;::value, __nat&gt;::type)</a>
<a name="3010"><span class="lineNum">    3010 </span>                :            :     : __ptr_(__p)</a>
<a name="3011"><span class="lineNum">    3011 </span>                :            : {</a>
<a name="3012"><span class="lineNum">    3012 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="3013"><span class="lineNum">    3013 </span>                :            :     try</a>
<a name="3014"><span class="lineNum">    3014 </span>                :            :     {</a>
<a name="3015"><span class="lineNum">    3015 </span>                :            : #endif  // _LIBCPP_NO_EXCEPTIONS</a>
<a name="3016"><span class="lineNum">    3016 </span>                :            :         typedef typename __shared_ptr_default_allocator&lt;_Yp&gt;::type _AllocT;</a>
<a name="3017"><span class="lineNum">    3017 </span>                :            :         typedef __shared_ptr_pointer&lt;_Yp*, _Dp, _AllocT &gt; _CntrlBlk;</a>
<a name="3018"><span class="lineNum">    3018 </span>                :            :         __cntrl_ = new _CntrlBlk(__p, __d, _AllocT());</a>
<a name="3019"><span class="lineNum">    3019 </span>                :            :         __enable_weak_this(__p, __p);</a>
<a name="3020"><span class="lineNum">    3020 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="3021"><span class="lineNum">    3021 </span>                :            :     }</a>
<a name="3022"><span class="lineNum">    3022 </span>                :            :     catch (...)</a>
<a name="3023"><span class="lineNum">    3023 </span>                :            :     {</a>
<a name="3024"><span class="lineNum">    3024 </span>                :            :         __d(__p);</a>
<a name="3025"><span class="lineNum">    3025 </span>                :            :         throw;</a>
<a name="3026"><span class="lineNum">    3026 </span>                :            :     }</a>
<a name="3027"><span class="lineNum">    3027 </span>                :            : #endif  // _LIBCPP_NO_EXCEPTIONS</a>
<a name="3028"><span class="lineNum">    3028 </span>                :            : }</a>
<a name="3029"><span class="lineNum">    3029 </span>                :            : </a>
<a name="3030"><span class="lineNum">    3030 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3031"><span class="lineNum">    3031 </span>                :            : template&lt;class _Dp&gt;</a>
<a name="3032"><span class="lineNum">    3032 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(nullptr_t __p, _Dp __d)</a>
<a name="3033"><span class="lineNum">    3033 </span>                :            :     : __ptr_(nullptr)</a>
<a name="3034"><span class="lineNum">    3034 </span>                :            : {</a>
<a name="3035"><span class="lineNum">    3035 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="3036"><span class="lineNum">    3036 </span>                :            :     try</a>
<a name="3037"><span class="lineNum">    3037 </span>                :            :     {</a>
<a name="3038"><span class="lineNum">    3038 </span>                :            : #endif  // _LIBCPP_NO_EXCEPTIONS</a>
<a name="3039"><span class="lineNum">    3039 </span>                :            :         typedef typename __shared_ptr_default_allocator&lt;_Tp&gt;::type _AllocT;</a>
<a name="3040"><span class="lineNum">    3040 </span>                :            :         typedef __shared_ptr_pointer&lt;nullptr_t, _Dp, _AllocT &gt; _CntrlBlk;</a>
<a name="3041"><span class="lineNum">    3041 </span>                :            :         __cntrl_ = new _CntrlBlk(__p, __d, _AllocT());</a>
<a name="3042"><span class="lineNum">    3042 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="3043"><span class="lineNum">    3043 </span>                :            :     }</a>
<a name="3044"><span class="lineNum">    3044 </span>                :            :     catch (...)</a>
<a name="3045"><span class="lineNum">    3045 </span>                :            :     {</a>
<a name="3046"><span class="lineNum">    3046 </span>                :            :         __d(__p);</a>
<a name="3047"><span class="lineNum">    3047 </span>                :            :         throw;</a>
<a name="3048"><span class="lineNum">    3048 </span>                :            :     }</a>
<a name="3049"><span class="lineNum">    3049 </span>                :            : #endif  // _LIBCPP_NO_EXCEPTIONS</a>
<a name="3050"><span class="lineNum">    3050 </span>                :            : }</a>
<a name="3051"><span class="lineNum">    3051 </span>                :            : </a>
<a name="3052"><span class="lineNum">    3052 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3053"><span class="lineNum">    3053 </span>                :            : template&lt;class _Yp, class _Dp, class _Alloc&gt;</a>
<a name="3054"><span class="lineNum">    3054 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(_Yp* __p, _Dp __d, _Alloc __a,</a>
<a name="3055"><span class="lineNum">    3055 </span>                :            :                             typename enable_if&lt;__compatible_with&lt;_Yp, element_type&gt;::value, __nat&gt;::type)</a>
<a name="3056"><span class="lineNum">    3056 </span>                :            :     : __ptr_(__p)</a>
<a name="3057"><span class="lineNum">    3057 </span>                :            : {</a>
<a name="3058"><span class="lineNum">    3058 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="3059"><span class="lineNum">    3059 </span>                :            :     try</a>
<a name="3060"><span class="lineNum">    3060 </span>                :            :     {</a>
<a name="3061"><span class="lineNum">    3061 </span>                :            : #endif  // _LIBCPP_NO_EXCEPTIONS</a>
<a name="3062"><span class="lineNum">    3062 </span>                :            :         typedef __shared_ptr_pointer&lt;_Yp*, _Dp, _Alloc&gt; _CntrlBlk;</a>
<a name="3063"><span class="lineNum">    3063 </span>                :            :         typedef typename __allocator_traits_rebind&lt;_Alloc, _CntrlBlk&gt;::type _A2;</a>
<a name="3064"><span class="lineNum">    3064 </span>                :            :         typedef __allocator_destructor&lt;_A2&gt; _D2;</a>
<a name="3065"><span class="lineNum">    3065 </span>                :            :         _A2 __a2(__a);</a>
<a name="3066"><span class="lineNum">    3066 </span>                :            :         unique_ptr&lt;_CntrlBlk, _D2&gt; __hold2(__a2.allocate(1), _D2(__a2, 1));</a>
<a name="3067"><span class="lineNum">    3067 </span>                :            :         ::new ((void*)_VSTD::addressof(*__hold2.get())) _CntrlBlk(__p, __d, __a);</a>
<a name="3068"><span class="lineNum">    3068 </span>                :            :         __cntrl_ = _VSTD::addressof(*__hold2.release());</a>
<a name="3069"><span class="lineNum">    3069 </span>                :            :         __enable_weak_this(__p, __p);</a>
<a name="3070"><span class="lineNum">    3070 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="3071"><span class="lineNum">    3071 </span>                :            :     }</a>
<a name="3072"><span class="lineNum">    3072 </span>                :            :     catch (...)</a>
<a name="3073"><span class="lineNum">    3073 </span>                :            :     {</a>
<a name="3074"><span class="lineNum">    3074 </span>                :            :         __d(__p);</a>
<a name="3075"><span class="lineNum">    3075 </span>                :            :         throw;</a>
<a name="3076"><span class="lineNum">    3076 </span>                :            :     }</a>
<a name="3077"><span class="lineNum">    3077 </span>                :            : #endif  // _LIBCPP_NO_EXCEPTIONS</a>
<a name="3078"><span class="lineNum">    3078 </span>                :            : }</a>
<a name="3079"><span class="lineNum">    3079 </span>                :            : </a>
<a name="3080"><span class="lineNum">    3080 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3081"><span class="lineNum">    3081 </span>                :            : template&lt;class _Dp, class _Alloc&gt;</a>
<a name="3082"><span class="lineNum">    3082 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a)</a>
<a name="3083"><span class="lineNum">    3083 </span>                :            :     : __ptr_(nullptr)</a>
<a name="3084"><span class="lineNum">    3084 </span>                :            : {</a>
<a name="3085"><span class="lineNum">    3085 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="3086"><span class="lineNum">    3086 </span>                :            :     try</a>
<a name="3087"><span class="lineNum">    3087 </span>                :            :     {</a>
<a name="3088"><span class="lineNum">    3088 </span>                :            : #endif  // _LIBCPP_NO_EXCEPTIONS</a>
<a name="3089"><span class="lineNum">    3089 </span>                :            :         typedef __shared_ptr_pointer&lt;nullptr_t, _Dp, _Alloc&gt; _CntrlBlk;</a>
<a name="3090"><span class="lineNum">    3090 </span>                :            :         typedef typename __allocator_traits_rebind&lt;_Alloc, _CntrlBlk&gt;::type _A2;</a>
<a name="3091"><span class="lineNum">    3091 </span>                :            :         typedef __allocator_destructor&lt;_A2&gt; _D2;</a>
<a name="3092"><span class="lineNum">    3092 </span>                :            :         _A2 __a2(__a);</a>
<a name="3093"><span class="lineNum">    3093 </span>                :            :         unique_ptr&lt;_CntrlBlk, _D2&gt; __hold2(__a2.allocate(1), _D2(__a2, 1));</a>
<a name="3094"><span class="lineNum">    3094 </span>                :            :         ::new ((void*)_VSTD::addressof(*__hold2.get())) _CntrlBlk(__p, __d, __a);</a>
<a name="3095"><span class="lineNum">    3095 </span>                :            :         __cntrl_ = _VSTD::addressof(*__hold2.release());</a>
<a name="3096"><span class="lineNum">    3096 </span>                :            : #ifndef _LIBCPP_NO_EXCEPTIONS</a>
<a name="3097"><span class="lineNum">    3097 </span>                :            :     }</a>
<a name="3098"><span class="lineNum">    3098 </span>                :            :     catch (...)</a>
<a name="3099"><span class="lineNum">    3099 </span>                :            :     {</a>
<a name="3100"><span class="lineNum">    3100 </span>                :            :         __d(__p);</a>
<a name="3101"><span class="lineNum">    3101 </span>                :            :         throw;</a>
<a name="3102"><span class="lineNum">    3102 </span>                :            :     }</a>
<a name="3103"><span class="lineNum">    3103 </span>                :            : #endif  // _LIBCPP_NO_EXCEPTIONS</a>
<a name="3104"><span class="lineNum">    3104 </span>                :            : }</a>
<a name="3105"><span class="lineNum">    3105 </span>                :            : </a>
<a name="3106"><span class="lineNum">    3106 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3107"><span class="lineNum">    3107 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3108"><span class="lineNum">    3108 </span>                :            : inline</a>
<a name="3109"><span class="lineNum">    3109 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(const shared_ptr&lt;_Yp&gt;&amp; __r, element_type *__p) _NOEXCEPT</a>
<a name="3110"><span class="lineNum">    3110 </span>                :            :     : __ptr_(__p),</a>
<a name="3111"><span class="lineNum">    3111 </span>                :            :       __cntrl_(__r.__cntrl_)</a>
<a name="3112"><span class="lineNum">    3112 </span>                :            : {</a>
<a name="3113"><span class="lineNum">    3113 </span>                :            :     if (__cntrl_)</a>
<a name="3114"><span class="lineNum">    3114 </span>                :            :         __cntrl_-&gt;__add_shared();</a>
<a name="3115"><span class="lineNum">    3115 </span>                :            : }</a>
<a name="3116"><span class="lineNum">    3116 </span>                :            : </a>
<a name="3117"><span class="lineNum">    3117 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3118"><span class="lineNum">    3118 </span>                :            : inline</a>
<a name="3119"><span class="lineNum">    3119 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(const shared_ptr&amp; __r) _NOEXCEPT</a>
<a name="3120"><span class="lineNum">    3120 </span>                :            :     : __ptr_(__r.__ptr_),</a>
<a name="3121"><span class="lineNum">    3121 </span>                :            :       __cntrl_(__r.__cntrl_)</a>
<a name="3122"><span class="lineNum">    3122 </span>                :            : {</a>
<a name="3123"><span class="lineNum">    3123 </span>                :            :     if (__cntrl_)</a>
<a name="3124"><span class="lineNum">    3124 </span>                :            :         __cntrl_-&gt;__add_shared();</a>
<a name="3125"><span class="lineNum">    3125 </span>                :            : }</a>
<a name="3126"><span class="lineNum">    3126 </span>                :            : </a>
<a name="3127"><span class="lineNum">    3127 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3128"><span class="lineNum">    3128 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3129"><span class="lineNum">    3129 </span>                :            : inline</a>
<a name="3130"><span class="lineNum">    3130 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(const shared_ptr&lt;_Yp&gt;&amp; __r,</a>
<a name="3131"><span class="lineNum">    3131 </span>                :            :                             typename enable_if&lt;__compatible_with&lt;_Yp, element_type&gt;::value, __nat&gt;::type)</a>
<a name="3132"><span class="lineNum">    3132 </span>                :            :          _NOEXCEPT</a>
<a name="3133"><span class="lineNum">    3133 </span>                :            :     : __ptr_(__r.__ptr_),</a>
<a name="3134"><span class="lineNum">    3134 </span>                :            :       __cntrl_(__r.__cntrl_)</a>
<a name="3135"><span class="lineNum">    3135 </span>                :            : {</a>
<a name="3136"><span class="lineNum">    3136 </span>                :            :     if (__cntrl_)</a>
<a name="3137"><span class="lineNum">    3137 </span>                :            :         __cntrl_-&gt;__add_shared();</a>
<a name="3138"><span class="lineNum">    3138 </span>                :            : }</a>
<a name="3139"><span class="lineNum">    3139 </span>                :            : </a>
<a name="3140"><span class="lineNum">    3140 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3141"><span class="lineNum">    3141 </span>                :            : inline</a>
<a name="3142"><span class="lineNum">    3142 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(shared_ptr&amp;&amp; __r) _NOEXCEPT</a>
<a name="3143"><span class="lineNum">    3143 </span>                :            :     : __ptr_(__r.__ptr_),</a>
<a name="3144"><span class="lineNum">    3144 </span>                :            :       __cntrl_(__r.__cntrl_)</a>
<a name="3145"><span class="lineNum">    3145 </span>                :            : {</a>
<a name="3146"><span class="lineNum">    3146 </span>                :            :     __r.__ptr_ = nullptr;</a>
<a name="3147"><span class="lineNum">    3147 </span>                :            :     __r.__cntrl_ = nullptr;</a>
<a name="3148"><span class="lineNum">    3148 </span>                :            : }</a>
<a name="3149"><span class="lineNum">    3149 </span>                :            : </a>
<a name="3150"><span class="lineNum">    3150 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3151"><span class="lineNum">    3151 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3152"><span class="lineNum">    3152 </span>                :            : inline</a>
<a name="3153"><span class="lineNum">    3153 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(shared_ptr&lt;_Yp&gt;&amp;&amp; __r,</a>
<a name="3154"><span class="lineNum">    3154 </span>                :            :                             typename enable_if&lt;__compatible_with&lt;_Yp, element_type&gt;::value, __nat&gt;::type)</a>
<a name="3155"><span class="lineNum">    3155 </span>                :            :          _NOEXCEPT</a>
<a name="3156"><span class="lineNum">    3156 </span>                :            :     : __ptr_(__r.__ptr_),</a>
<a name="3157"><span class="lineNum">    3157 </span>                :            :       __cntrl_(__r.__cntrl_)</a>
<a name="3158"><span class="lineNum">    3158 </span>                :            : {</a>
<a name="3159"><span class="lineNum">    3159 </span>                :            :     __r.__ptr_ = nullptr;</a>
<a name="3160"><span class="lineNum">    3160 </span>                :            :     __r.__cntrl_ = nullptr;</a>
<a name="3161"><span class="lineNum">    3161 </span>                :            : }</a>
<a name="3162"><span class="lineNum">    3162 </span>                :            : </a>
<a name="3163"><span class="lineNum">    3163 </span>                :            : #if _LIBCPP_STD_VER &lt;= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)</a>
<a name="3164"><span class="lineNum">    3164 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3165"><span class="lineNum">    3165 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3166"><span class="lineNum">    3166 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(auto_ptr&lt;_Yp&gt;&amp;&amp; __r,</a>
<a name="3167"><span class="lineNum">    3167 </span>                :            :                             typename enable_if&lt;is_convertible&lt;_Yp*, element_type*&gt;::value, __nat&gt;::type)</a>
<a name="3168"><span class="lineNum">    3168 </span>                :            :     : __ptr_(__r.get())</a>
<a name="3169"><span class="lineNum">    3169 </span>                :            : {</a>
<a name="3170"><span class="lineNum">    3170 </span>                :            :     typedef __shared_ptr_pointer&lt;_Yp*, default_delete&lt;_Yp&gt;, allocator&lt;_Yp&gt; &gt; _CntrlBlk;</a>
<a name="3171"><span class="lineNum">    3171 </span>                :            :     __cntrl_ = new _CntrlBlk(__r.get(), default_delete&lt;_Yp&gt;(), allocator&lt;_Yp&gt;());</a>
<a name="3172"><span class="lineNum">    3172 </span>                :            :     __enable_weak_this(__r.get(), __r.get());</a>
<a name="3173"><span class="lineNum">    3173 </span>                :            :     __r.release();</a>
<a name="3174"><span class="lineNum">    3174 </span>                :            : }</a>
<a name="3175"><span class="lineNum">    3175 </span>                :            : #endif</a>
<a name="3176"><span class="lineNum">    3176 </span>                :            : </a>
<a name="3177"><span class="lineNum">    3177 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3178"><span class="lineNum">    3178 </span>                :            : template &lt;class _Yp, class _Dp&gt;</a>
<a name="3179"><span class="lineNum">    3179 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(unique_ptr&lt;_Yp, _Dp&gt;&amp;&amp; __r,</a>
<a name="3180"><span class="lineNum">    3180 </span>                :            :                             typename enable_if</a>
<a name="3181"><span class="lineNum">    3181 </span>                :            :                             &lt;</a>
<a name="3182"><span class="lineNum">    3182 </span>                :            :                                 !is_lvalue_reference&lt;_Dp&gt;::value &amp;&amp;</a>
<a name="3183"><span class="lineNum">    3183 </span>                :            :                                 is_convertible&lt;typename unique_ptr&lt;_Yp, _Dp&gt;::pointer, element_type*&gt;::value,</a>
<a name="3184"><span class="lineNum">    3184 </span>                :            :                                 __nat</a>
<a name="3185"><span class="lineNum">    3185 </span>                :            :                             &gt;::type)</a>
<a name="3186"><span class="lineNum">    3186 </span>                :            :     : __ptr_(__r.get())</a>
<a name="3187"><span class="lineNum">    3187 </span>                :            : {</a>
<a name="3188"><span class="lineNum">    3188 </span>                :            : #if _LIBCPP_STD_VER &gt; 11</a>
<a name="3189"><span class="lineNum">    3189 </span>                :            :     if (__ptr_ == nullptr)</a>
<a name="3190"><span class="lineNum">    3190 </span>                :            :         __cntrl_ = nullptr;</a>
<a name="3191"><span class="lineNum">    3191 </span>                :            :     else</a>
<a name="3192"><span class="lineNum">    3192 </span>                :            : #endif</a>
<a name="3193"><span class="lineNum">    3193 </span>                :            :     {</a>
<a name="3194"><span class="lineNum">    3194 </span>                :            :         typedef typename __shared_ptr_default_allocator&lt;_Yp&gt;::type _AllocT;</a>
<a name="3195"><span class="lineNum">    3195 </span>                :            :         typedef __shared_ptr_pointer&lt;typename unique_ptr&lt;_Yp, _Dp&gt;::pointer, _Dp, _AllocT &gt; _CntrlBlk;</a>
<a name="3196"><span class="lineNum">    3196 </span>                :            :         __cntrl_ = new _CntrlBlk(__r.get(), __r.get_deleter(), _AllocT());</a>
<a name="3197"><span class="lineNum">    3197 </span>                :            :         __enable_weak_this(__r.get(), __r.get());</a>
<a name="3198"><span class="lineNum">    3198 </span>                :            :     }</a>
<a name="3199"><span class="lineNum">    3199 </span>                :            :     __r.release();</a>
<a name="3200"><span class="lineNum">    3200 </span>                :            : }</a>
<a name="3201"><span class="lineNum">    3201 </span>                :            : </a>
<a name="3202"><span class="lineNum">    3202 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3203"><span class="lineNum">    3203 </span>                :            : template &lt;class _Yp, class _Dp&gt;</a>
<a name="3204"><span class="lineNum">    3204 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(unique_ptr&lt;_Yp, _Dp&gt;&amp;&amp; __r,</a>
<a name="3205"><span class="lineNum">    3205 </span>                :            :                             typename enable_if</a>
<a name="3206"><span class="lineNum">    3206 </span>                :            :                             &lt;</a>
<a name="3207"><span class="lineNum">    3207 </span>                :            :                                 is_lvalue_reference&lt;_Dp&gt;::value &amp;&amp;</a>
<a name="3208"><span class="lineNum">    3208 </span>                :            :                                 is_convertible&lt;typename unique_ptr&lt;_Yp, _Dp&gt;::pointer, element_type*&gt;::value,</a>
<a name="3209"><span class="lineNum">    3209 </span>                :            :                                 __nat</a>
<a name="3210"><span class="lineNum">    3210 </span>                :            :                             &gt;::type)</a>
<a name="3211"><span class="lineNum">    3211 </span>                :            :     : __ptr_(__r.get())</a>
<a name="3212"><span class="lineNum">    3212 </span>                :            : {</a>
<a name="3213"><span class="lineNum">    3213 </span>                :            : #if _LIBCPP_STD_VER &gt; 11</a>
<a name="3214"><span class="lineNum">    3214 </span>                :            :     if (__ptr_ == nullptr)</a>
<a name="3215"><span class="lineNum">    3215 </span>                :            :         __cntrl_ = nullptr;</a>
<a name="3216"><span class="lineNum">    3216 </span>                :            :     else</a>
<a name="3217"><span class="lineNum">    3217 </span>                :            : #endif</a>
<a name="3218"><span class="lineNum">    3218 </span>                :            :     {</a>
<a name="3219"><span class="lineNum">    3219 </span>                :            :         typedef typename __shared_ptr_default_allocator&lt;_Yp&gt;::type _AllocT;</a>
<a name="3220"><span class="lineNum">    3220 </span>                :            :         typedef __shared_ptr_pointer&lt;typename unique_ptr&lt;_Yp, _Dp&gt;::pointer,</a>
<a name="3221"><span class="lineNum">    3221 </span>                :            :                                      reference_wrapper&lt;typename remove_reference&lt;_Dp&gt;::type&gt;,</a>
<a name="3222"><span class="lineNum">    3222 </span>                :            :                                      _AllocT &gt; _CntrlBlk;</a>
<a name="3223"><span class="lineNum">    3223 </span>                :            :         __cntrl_ = new _CntrlBlk(__r.get(), _VSTD::ref(__r.get_deleter()), _AllocT());</a>
<a name="3224"><span class="lineNum">    3224 </span>                :            :         __enable_weak_this(__r.get(), __r.get());</a>
<a name="3225"><span class="lineNum">    3225 </span>                :            :     }</a>
<a name="3226"><span class="lineNum">    3226 </span>                :            :     __r.release();</a>
<a name="3227"><span class="lineNum">    3227 </span>                :            : }</a>
<a name="3228"><span class="lineNum">    3228 </span>                :            : </a>
<a name="3229"><span class="lineNum">    3229 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3230"><span class="lineNum">    3230 </span>                :            : shared_ptr&lt;_Tp&gt;::~shared_ptr()</a>
<a name="3231"><span class="lineNum">    3231 </span>                :            : {</a>
<a name="3232"><span class="lineNum">    3232 </span>                :            :     if (__cntrl_)</a>
<a name="3233"><span class="lineNum">    3233 </span>                :            :         __cntrl_-&gt;__release_shared();</a>
<a name="3234"><span class="lineNum">    3234 </span>                :            : }</a>
<a name="3235"><span class="lineNum">    3235 </span>                :            : </a>
<a name="3236"><span class="lineNum">    3236 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3237"><span class="lineNum">    3237 </span>                :            : inline</a>
<a name="3238"><span class="lineNum">    3238 </span>                :            : shared_ptr&lt;_Tp&gt;&amp;</a>
<a name="3239"><span class="lineNum">    3239 </span>                :            : shared_ptr&lt;_Tp&gt;::operator=(const shared_ptr&amp; __r) _NOEXCEPT</a>
<a name="3240"><span class="lineNum">    3240 </span>                :            : {</a>
<a name="3241"><span class="lineNum">    3241 </span>                :            :     shared_ptr(__r).swap(*this);</a>
<a name="3242"><span class="lineNum">    3242 </span>                :            :     return *this;</a>
<a name="3243"><span class="lineNum">    3243 </span>                :            : }</a>
<a name="3244"><span class="lineNum">    3244 </span>                :            : </a>
<a name="3245"><span class="lineNum">    3245 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3246"><span class="lineNum">    3246 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3247"><span class="lineNum">    3247 </span>                :            : inline</a>
<a name="3248"><span class="lineNum">    3248 </span>                :            : typename enable_if</a>
<a name="3249"><span class="lineNum">    3249 </span>                :            : &lt;</a>
<a name="3250"><span class="lineNum">    3250 </span>                :            :     __compatible_with&lt;_Yp, typename shared_ptr&lt;_Tp&gt;::element_type&gt;::value,</a>
<a name="3251"><span class="lineNum">    3251 </span>                :            :     shared_ptr&lt;_Tp&gt;&amp;</a>
<a name="3252"><span class="lineNum">    3252 </span>                :            : &gt;::type</a>
<a name="3253"><span class="lineNum">    3253 </span>                :            : shared_ptr&lt;_Tp&gt;::operator=(const shared_ptr&lt;_Yp&gt;&amp; __r) _NOEXCEPT</a>
<a name="3254"><span class="lineNum">    3254 </span>                :            : {</a>
<a name="3255"><span class="lineNum">    3255 </span>                :            :     shared_ptr(__r).swap(*this);</a>
<a name="3256"><span class="lineNum">    3256 </span>                :            :     return *this;</a>
<a name="3257"><span class="lineNum">    3257 </span>                :            : }</a>
<a name="3258"><span class="lineNum">    3258 </span>                :            : </a>
<a name="3259"><span class="lineNum">    3259 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3260"><span class="lineNum">    3260 </span>                :            : inline</a>
<a name="3261"><span class="lineNum">    3261 </span>                :            : shared_ptr&lt;_Tp&gt;&amp;</a>
<a name="3262"><span class="lineNum">    3262 </span>                :            : shared_ptr&lt;_Tp&gt;::operator=(shared_ptr&amp;&amp; __r) _NOEXCEPT</a>
<a name="3263"><span class="lineNum">    3263 </span>                :            : {</a>
<a name="3264"><span class="lineNum">    3264 </span>                :            :     shared_ptr(_VSTD::move(__r)).swap(*this);</a>
<a name="3265"><span class="lineNum">    3265 </span>                :            :     return *this;</a>
<a name="3266"><span class="lineNum">    3266 </span>                :            : }</a>
<a name="3267"><span class="lineNum">    3267 </span>                :            : </a>
<a name="3268"><span class="lineNum">    3268 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3269"><span class="lineNum">    3269 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3270"><span class="lineNum">    3270 </span>                :            : inline</a>
<a name="3271"><span class="lineNum">    3271 </span>                :            : typename enable_if</a>
<a name="3272"><span class="lineNum">    3272 </span>                :            : &lt;</a>
<a name="3273"><span class="lineNum">    3273 </span>                :            :     __compatible_with&lt;_Yp, typename shared_ptr&lt;_Tp&gt;::element_type&gt;::value,</a>
<a name="3274"><span class="lineNum">    3274 </span>                :            :     shared_ptr&lt;_Tp&gt;&amp;</a>
<a name="3275"><span class="lineNum">    3275 </span>                :            : &gt;::type</a>
<a name="3276"><span class="lineNum">    3276 </span>                :            : shared_ptr&lt;_Tp&gt;::operator=(shared_ptr&lt;_Yp&gt;&amp;&amp; __r)</a>
<a name="3277"><span class="lineNum">    3277 </span>                :            : {</a>
<a name="3278"><span class="lineNum">    3278 </span>                :            :     shared_ptr(_VSTD::move(__r)).swap(*this);</a>
<a name="3279"><span class="lineNum">    3279 </span>                :            :     return *this;</a>
<a name="3280"><span class="lineNum">    3280 </span>                :            : }</a>
<a name="3281"><span class="lineNum">    3281 </span>                :            : </a>
<a name="3282"><span class="lineNum">    3282 </span>                :            : #if _LIBCPP_STD_VER &lt;= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)</a>
<a name="3283"><span class="lineNum">    3283 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3284"><span class="lineNum">    3284 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3285"><span class="lineNum">    3285 </span>                :            : inline</a>
<a name="3286"><span class="lineNum">    3286 </span>                :            : typename enable_if</a>
<a name="3287"><span class="lineNum">    3287 </span>                :            : &lt;</a>
<a name="3288"><span class="lineNum">    3288 </span>                :            :     !is_array&lt;_Yp&gt;::value &amp;&amp;</a>
<a name="3289"><span class="lineNum">    3289 </span>                :            :     is_convertible&lt;_Yp*, typename shared_ptr&lt;_Tp&gt;::element_type*&gt;::value,</a>
<a name="3290"><span class="lineNum">    3290 </span>                :            :     shared_ptr&lt;_Tp&gt;</a>
<a name="3291"><span class="lineNum">    3291 </span>                :            : &gt;::type&amp;</a>
<a name="3292"><span class="lineNum">    3292 </span>                :            : shared_ptr&lt;_Tp&gt;::operator=(auto_ptr&lt;_Yp&gt;&amp;&amp; __r)</a>
<a name="3293"><span class="lineNum">    3293 </span>                :            : {</a>
<a name="3294"><span class="lineNum">    3294 </span>                :            :     shared_ptr(_VSTD::move(__r)).swap(*this);</a>
<a name="3295"><span class="lineNum">    3295 </span>                :            :     return *this;</a>
<a name="3296"><span class="lineNum">    3296 </span>                :            : }</a>
<a name="3297"><span class="lineNum">    3297 </span>                :            : #endif</a>
<a name="3298"><span class="lineNum">    3298 </span>                :            : </a>
<a name="3299"><span class="lineNum">    3299 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3300"><span class="lineNum">    3300 </span>                :            : template &lt;class _Yp, class _Dp&gt;</a>
<a name="3301"><span class="lineNum">    3301 </span>                :            : inline</a>
<a name="3302"><span class="lineNum">    3302 </span>                :            : typename enable_if</a>
<a name="3303"><span class="lineNum">    3303 </span>                :            : &lt;</a>
<a name="3304"><span class="lineNum">    3304 </span>                :            :     is_convertible&lt;typename unique_ptr&lt;_Yp, _Dp&gt;::pointer,</a>
<a name="3305"><span class="lineNum">    3305 </span>                :            :                    typename shared_ptr&lt;_Tp&gt;::element_type*&gt;::value,</a>
<a name="3306"><span class="lineNum">    3306 </span>                :            :     shared_ptr&lt;_Tp&gt;&amp;</a>
<a name="3307"><span class="lineNum">    3307 </span>                :            : &gt;::type</a>
<a name="3308"><span class="lineNum">    3308 </span>                :            : shared_ptr&lt;_Tp&gt;::operator=(unique_ptr&lt;_Yp, _Dp&gt;&amp;&amp; __r)</a>
<a name="3309"><span class="lineNum">    3309 </span>                :            : {</a>
<a name="3310"><span class="lineNum">    3310 </span>                :            :     shared_ptr(_VSTD::move(__r)).swap(*this);</a>
<a name="3311"><span class="lineNum">    3311 </span>                :            :     return *this;</a>
<a name="3312"><span class="lineNum">    3312 </span>                :            : }</a>
<a name="3313"><span class="lineNum">    3313 </span>                :            : </a>
<a name="3314"><span class="lineNum">    3314 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3315"><span class="lineNum">    3315 </span>                :            : inline</a>
<a name="3316"><span class="lineNum">    3316 </span>                :            : void</a>
<a name="3317"><span class="lineNum">    3317 </span>                :            : shared_ptr&lt;_Tp&gt;::swap(shared_ptr&amp; __r) _NOEXCEPT</a>
<a name="3318"><span class="lineNum">    3318 </span>                :            : {</a>
<a name="3319"><span class="lineNum">    3319 </span>                :            :     _VSTD::swap(__ptr_, __r.__ptr_);</a>
<a name="3320"><span class="lineNum">    3320 </span>                :            :     _VSTD::swap(__cntrl_, __r.__cntrl_);</a>
<a name="3321"><span class="lineNum">    3321 </span>                :            : }</a>
<a name="3322"><span class="lineNum">    3322 </span>                :            : </a>
<a name="3323"><span class="lineNum">    3323 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3324"><span class="lineNum">    3324 </span>                :            : inline</a>
<a name="3325"><span class="lineNum">    3325 </span>                :            : void</a>
<a name="3326"><span class="lineNum">    3326 </span>                :            : shared_ptr&lt;_Tp&gt;::reset() _NOEXCEPT</a>
<a name="3327"><span class="lineNum">    3327 </span>                :            : {</a>
<a name="3328"><span class="lineNum">    3328 </span>                :            :     shared_ptr().swap(*this);</a>
<a name="3329"><span class="lineNum">    3329 </span>                :            : }</a>
<a name="3330"><span class="lineNum">    3330 </span>                :            : </a>
<a name="3331"><span class="lineNum">    3331 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3332"><span class="lineNum">    3332 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3333"><span class="lineNum">    3333 </span>                :            : inline</a>
<a name="3334"><span class="lineNum">    3334 </span>                :            : typename enable_if</a>
<a name="3335"><span class="lineNum">    3335 </span>                :            : &lt;</a>
<a name="3336"><span class="lineNum">    3336 </span>                :            :     __compatible_with&lt;_Yp, typename shared_ptr&lt;_Tp&gt;::element_type&gt;::value,</a>
<a name="3337"><span class="lineNum">    3337 </span>                :            :     void</a>
<a name="3338"><span class="lineNum">    3338 </span>                :            : &gt;::type</a>
<a name="3339"><span class="lineNum">    3339 </span>                :            : shared_ptr&lt;_Tp&gt;::reset(_Yp* __p)</a>
<a name="3340"><span class="lineNum">    3340 </span>                :            : {</a>
<a name="3341"><span class="lineNum">    3341 </span>                :            :     shared_ptr(__p).swap(*this);</a>
<a name="3342"><span class="lineNum">    3342 </span>                :            : }</a>
<a name="3343"><span class="lineNum">    3343 </span>                :            : </a>
<a name="3344"><span class="lineNum">    3344 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3345"><span class="lineNum">    3345 </span>                :            : template&lt;class _Yp, class _Dp&gt;</a>
<a name="3346"><span class="lineNum">    3346 </span>                :            : inline</a>
<a name="3347"><span class="lineNum">    3347 </span>                :            : typename enable_if</a>
<a name="3348"><span class="lineNum">    3348 </span>                :            : &lt;</a>
<a name="3349"><span class="lineNum">    3349 </span>                :            :     __compatible_with&lt;_Yp, typename shared_ptr&lt;_Tp&gt;::element_type&gt;::value,</a>
<a name="3350"><span class="lineNum">    3350 </span>                :            :     void</a>
<a name="3351"><span class="lineNum">    3351 </span>                :            : &gt;::type</a>
<a name="3352"><span class="lineNum">    3352 </span>                :            : shared_ptr&lt;_Tp&gt;::reset(_Yp* __p, _Dp __d)</a>
<a name="3353"><span class="lineNum">    3353 </span>                :            : {</a>
<a name="3354"><span class="lineNum">    3354 </span>                :            :     shared_ptr(__p, __d).swap(*this);</a>
<a name="3355"><span class="lineNum">    3355 </span>                :            : }</a>
<a name="3356"><span class="lineNum">    3356 </span>                :            : </a>
<a name="3357"><span class="lineNum">    3357 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3358"><span class="lineNum">    3358 </span>                :            : template&lt;class _Yp, class _Dp, class _Alloc&gt;</a>
<a name="3359"><span class="lineNum">    3359 </span>                :            : inline</a>
<a name="3360"><span class="lineNum">    3360 </span>                :            : typename enable_if</a>
<a name="3361"><span class="lineNum">    3361 </span>                :            : &lt;</a>
<a name="3362"><span class="lineNum">    3362 </span>                :            :     __compatible_with&lt;_Yp, typename shared_ptr&lt;_Tp&gt;::element_type&gt;::value,</a>
<a name="3363"><span class="lineNum">    3363 </span>                :            :     void</a>
<a name="3364"><span class="lineNum">    3364 </span>                :            : &gt;::type</a>
<a name="3365"><span class="lineNum">    3365 </span>                :            : shared_ptr&lt;_Tp&gt;::reset(_Yp* __p, _Dp __d, _Alloc __a)</a>
<a name="3366"><span class="lineNum">    3366 </span>                :            : {</a>
<a name="3367"><span class="lineNum">    3367 </span>                :            :     shared_ptr(__p, __d, __a).swap(*this);</a>
<a name="3368"><span class="lineNum">    3368 </span>                :            : }</a>
<a name="3369"><span class="lineNum">    3369 </span>                :            : </a>
<a name="3370"><span class="lineNum">    3370 </span>                :            : //</a>
<a name="3371"><span class="lineNum">    3371 </span>                :            : // std::allocate_shared and std::make_shared</a>
<a name="3372"><span class="lineNum">    3372 </span>                :            : //</a>
<a name="3373"><span class="lineNum">    3373 </span>                :            : template&lt;class _Tp, class _Alloc, class ..._Args, class = _EnableIf&lt;!is_array&lt;_Tp&gt;::value&gt; &gt;</a>
<a name="3374"><span class="lineNum">    3374 </span>                :            : _LIBCPP_HIDE_FROM_ABI</a>
<a name="3375"><span class="lineNum">    3375 </span>                :            : shared_ptr&lt;_Tp&gt; allocate_shared(const _Alloc&amp; __a, _Args&amp;&amp; ...__args)</a>
<a name="3376"><span class="lineNum">    3376 </span>                :            : {</a>
<a name="3377"><span class="lineNum">    3377 </span>                :            :     using _ControlBlock = __shared_ptr_emplace&lt;_Tp, _Alloc&gt;;</a>
<a name="3378"><span class="lineNum">    3378 </span>                :            :     using _ControlBlockAllocator = typename __allocator_traits_rebind&lt;_Alloc, _ControlBlock&gt;::type;</a>
<a name="3379"><span class="lineNum">    3379 </span>                :            :     __allocation_guard&lt;_ControlBlockAllocator&gt; __guard(__a, 1);</a>
<a name="3380"><span class="lineNum">    3380 </span>                :            :     ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward&lt;_Args&gt;(__args)...);</a>
<a name="3381"><span class="lineNum">    3381 </span>                :            :     auto __control_block = __guard.__release_ptr();</a>
<a name="3382"><span class="lineNum">    3382 </span>                :            :     return shared_ptr&lt;_Tp&gt;::__create_with_control_block((*__control_block).__get_elem(), _VSTD::addressof(*__control_block));</a>
<a name="3383"><span class="lineNum">    3383 </span>                :            : }</a>
<a name="3384"><span class="lineNum">    3384 </span>                :            : </a>
<a name="3385"><span class="lineNum">    3385 </span>                :            : template&lt;class _Tp, class ..._Args, class = _EnableIf&lt;!is_array&lt;_Tp&gt;::value&gt; &gt;</a>
<a name="3386"><span class="lineNum">    3386 </span>                :            : _LIBCPP_HIDE_FROM_ABI</a>
<a name="3387"><span class="lineNum">    3387 </span>                :            : shared_ptr&lt;_Tp&gt; make_shared(_Args&amp;&amp; ...__args)</a>
<a name="3388"><span class="lineNum">    3388 </span>                :            : {</a>
<a name="3389"><span class="lineNum">    3389 </span>                :            :     return _VSTD::allocate_shared&lt;_Tp&gt;(allocator&lt;_Tp&gt;(), _VSTD::forward&lt;_Args&gt;(__args)...);</a>
<a name="3390"><span class="lineNum">    3390 </span>                :            : }</a>
<a name="3391"><span class="lineNum">    3391 </span>                :            : </a>
<a name="3392"><span class="lineNum">    3392 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="3393"><span class="lineNum">    3393 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3394"><span class="lineNum">    3394 </span>                :            : bool</a>
<a name="3395"><span class="lineNum">    3395 </span>                :            : operator==(const shared_ptr&lt;_Tp&gt;&amp; __x, const shared_ptr&lt;_Up&gt;&amp; __y) _NOEXCEPT</a>
<a name="3396"><span class="lineNum">    3396 </span>                :            : {</a>
<a name="3397"><span class="lineNum">    3397 </span>                :            :     return __x.get() == __y.get();</a>
<a name="3398"><span class="lineNum">    3398 </span>                :            : }</a>
<a name="3399"><span class="lineNum">    3399 </span>                :            : </a>
<a name="3400"><span class="lineNum">    3400 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="3401"><span class="lineNum">    3401 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3402"><span class="lineNum">    3402 </span>                :            : bool</a>
<a name="3403"><span class="lineNum">    3403 </span>                :            : operator!=(const shared_ptr&lt;_Tp&gt;&amp; __x, const shared_ptr&lt;_Up&gt;&amp; __y) _NOEXCEPT</a>
<a name="3404"><span class="lineNum">    3404 </span>                :            : {</a>
<a name="3405"><span class="lineNum">    3405 </span>                :            :     return !(__x == __y);</a>
<a name="3406"><span class="lineNum">    3406 </span>                :            : }</a>
<a name="3407"><span class="lineNum">    3407 </span>                :            : </a>
<a name="3408"><span class="lineNum">    3408 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="3409"><span class="lineNum">    3409 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3410"><span class="lineNum">    3410 </span>                :            : bool</a>
<a name="3411"><span class="lineNum">    3411 </span>                :            : operator&lt;(const shared_ptr&lt;_Tp&gt;&amp; __x, const shared_ptr&lt;_Up&gt;&amp; __y) _NOEXCEPT</a>
<a name="3412"><span class="lineNum">    3412 </span>                :            : {</a>
<a name="3413"><span class="lineNum">    3413 </span>                :            : #if _LIBCPP_STD_VER &lt;= 11</a>
<a name="3414"><span class="lineNum">    3414 </span>                :            :     typedef typename common_type&lt;_Tp*, _Up*&gt;::type _Vp;</a>
<a name="3415"><span class="lineNum">    3415 </span>                :            :     return less&lt;_Vp&gt;()(__x.get(), __y.get());</a>
<a name="3416"><span class="lineNum">    3416 </span>                :            : #else</a>
<a name="3417"><span class="lineNum">    3417 </span>                :            :     return less&lt;&gt;()(__x.get(), __y.get());</a>
<a name="3418"><span class="lineNum">    3418 </span>                :            : #endif</a>
<a name="3419"><span class="lineNum">    3419 </span>                :            : </a>
<a name="3420"><span class="lineNum">    3420 </span>                :            : }</a>
<a name="3421"><span class="lineNum">    3421 </span>                :            : </a>
<a name="3422"><span class="lineNum">    3422 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="3423"><span class="lineNum">    3423 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3424"><span class="lineNum">    3424 </span>                :            : bool</a>
<a name="3425"><span class="lineNum">    3425 </span>                :            : operator&gt;(const shared_ptr&lt;_Tp&gt;&amp; __x, const shared_ptr&lt;_Up&gt;&amp; __y) _NOEXCEPT</a>
<a name="3426"><span class="lineNum">    3426 </span>                :            : {</a>
<a name="3427"><span class="lineNum">    3427 </span>                :            :     return __y &lt; __x;</a>
<a name="3428"><span class="lineNum">    3428 </span>                :            : }</a>
<a name="3429"><span class="lineNum">    3429 </span>                :            : </a>
<a name="3430"><span class="lineNum">    3430 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="3431"><span class="lineNum">    3431 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3432"><span class="lineNum">    3432 </span>                :            : bool</a>
<a name="3433"><span class="lineNum">    3433 </span>                :            : operator&lt;=(const shared_ptr&lt;_Tp&gt;&amp; __x, const shared_ptr&lt;_Up&gt;&amp; __y) _NOEXCEPT</a>
<a name="3434"><span class="lineNum">    3434 </span>                :            : {</a>
<a name="3435"><span class="lineNum">    3435 </span>                :            :     return !(__y &lt; __x);</a>
<a name="3436"><span class="lineNum">    3436 </span>                :            : }</a>
<a name="3437"><span class="lineNum">    3437 </span>                :            : </a>
<a name="3438"><span class="lineNum">    3438 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="3439"><span class="lineNum">    3439 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3440"><span class="lineNum">    3440 </span>                :            : bool</a>
<a name="3441"><span class="lineNum">    3441 </span>                :            : operator&gt;=(const shared_ptr&lt;_Tp&gt;&amp; __x, const shared_ptr&lt;_Up&gt;&amp; __y) _NOEXCEPT</a>
<a name="3442"><span class="lineNum">    3442 </span>                :            : {</a>
<a name="3443"><span class="lineNum">    3443 </span>                :            :     return !(__x &lt; __y);</a>
<a name="3444"><span class="lineNum">    3444 </span>                :            : }</a>
<a name="3445"><span class="lineNum">    3445 </span>                :            : </a>
<a name="3446"><span class="lineNum">    3446 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3447"><span class="lineNum">    3447 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3448"><span class="lineNum">    3448 </span>                :            : bool</a>
<a name="3449"><span class="lineNum">    3449 </span>                :            : operator==(const shared_ptr&lt;_Tp&gt;&amp; __x, nullptr_t) _NOEXCEPT</a>
<a name="3450"><span class="lineNum">    3450 </span>                :            : {</a>
<a name="3451"><span class="lineNum">    3451 </span>                :            :     return !__x;</a>
<a name="3452"><span class="lineNum">    3452 </span>                :            : }</a>
<a name="3453"><span class="lineNum">    3453 </span>                :            : </a>
<a name="3454"><span class="lineNum">    3454 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3455"><span class="lineNum">    3455 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3456"><span class="lineNum">    3456 </span>                :            : bool</a>
<a name="3457"><span class="lineNum">    3457 </span>                :            : operator==(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __x) _NOEXCEPT</a>
<a name="3458"><span class="lineNum">    3458 </span>                :            : {</a>
<a name="3459"><span class="lineNum">    3459 </span>                :            :     return !__x;</a>
<a name="3460"><span class="lineNum">    3460 </span>                :            : }</a>
<a name="3461"><span class="lineNum">    3461 </span>                :            : </a>
<a name="3462"><span class="lineNum">    3462 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3463"><span class="lineNum">    3463 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3464"><span class="lineNum">    3464 </span>                :            : bool</a>
<a name="3465"><span class="lineNum">    3465 </span>                :            : operator!=(const shared_ptr&lt;_Tp&gt;&amp; __x, nullptr_t) _NOEXCEPT</a>
<a name="3466"><span class="lineNum">    3466 </span>                :            : {</a>
<a name="3467"><span class="lineNum">    3467 </span>                :            :     return static_cast&lt;bool&gt;(__x);</a>
<a name="3468"><span class="lineNum">    3468 </span>                :            : }</a>
<a name="3469"><span class="lineNum">    3469 </span>                :            : </a>
<a name="3470"><span class="lineNum">    3470 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3471"><span class="lineNum">    3471 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3472"><span class="lineNum">    3472 </span>                :            : bool</a>
<a name="3473"><span class="lineNum">    3473 </span>                :            : operator!=(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __x) _NOEXCEPT</a>
<a name="3474"><span class="lineNum">    3474 </span>                :            : {</a>
<a name="3475"><span class="lineNum">    3475 </span>                :            :     return static_cast&lt;bool&gt;(__x);</a>
<a name="3476"><span class="lineNum">    3476 </span>                :            : }</a>
<a name="3477"><span class="lineNum">    3477 </span>                :            : </a>
<a name="3478"><span class="lineNum">    3478 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3479"><span class="lineNum">    3479 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3480"><span class="lineNum">    3480 </span>                :            : bool</a>
<a name="3481"><span class="lineNum">    3481 </span>                :            : operator&lt;(const shared_ptr&lt;_Tp&gt;&amp; __x, nullptr_t) _NOEXCEPT</a>
<a name="3482"><span class="lineNum">    3482 </span>                :            : {</a>
<a name="3483"><span class="lineNum">    3483 </span>                :            :     return less&lt;_Tp*&gt;()(__x.get(), nullptr);</a>
<a name="3484"><span class="lineNum">    3484 </span>                :            : }</a>
<a name="3485"><span class="lineNum">    3485 </span>                :            : </a>
<a name="3486"><span class="lineNum">    3486 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3487"><span class="lineNum">    3487 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3488"><span class="lineNum">    3488 </span>                :            : bool</a>
<a name="3489"><span class="lineNum">    3489 </span>                :            : operator&lt;(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __x) _NOEXCEPT</a>
<a name="3490"><span class="lineNum">    3490 </span>                :            : {</a>
<a name="3491"><span class="lineNum">    3491 </span>                :            :     return less&lt;_Tp*&gt;()(nullptr, __x.get());</a>
<a name="3492"><span class="lineNum">    3492 </span>                :            : }</a>
<a name="3493"><span class="lineNum">    3493 </span>                :            : </a>
<a name="3494"><span class="lineNum">    3494 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3495"><span class="lineNum">    3495 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3496"><span class="lineNum">    3496 </span>                :            : bool</a>
<a name="3497"><span class="lineNum">    3497 </span>                :            : operator&gt;(const shared_ptr&lt;_Tp&gt;&amp; __x, nullptr_t) _NOEXCEPT</a>
<a name="3498"><span class="lineNum">    3498 </span>                :            : {</a>
<a name="3499"><span class="lineNum">    3499 </span>                :            :     return nullptr &lt; __x;</a>
<a name="3500"><span class="lineNum">    3500 </span>                :            : }</a>
<a name="3501"><span class="lineNum">    3501 </span>                :            : </a>
<a name="3502"><span class="lineNum">    3502 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3503"><span class="lineNum">    3503 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3504"><span class="lineNum">    3504 </span>                :            : bool</a>
<a name="3505"><span class="lineNum">    3505 </span>                :            : operator&gt;(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __x) _NOEXCEPT</a>
<a name="3506"><span class="lineNum">    3506 </span>                :            : {</a>
<a name="3507"><span class="lineNum">    3507 </span>                :            :     return __x &lt; nullptr;</a>
<a name="3508"><span class="lineNum">    3508 </span>                :            : }</a>
<a name="3509"><span class="lineNum">    3509 </span>                :            : </a>
<a name="3510"><span class="lineNum">    3510 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3511"><span class="lineNum">    3511 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3512"><span class="lineNum">    3512 </span>                :            : bool</a>
<a name="3513"><span class="lineNum">    3513 </span>                :            : operator&lt;=(const shared_ptr&lt;_Tp&gt;&amp; __x, nullptr_t) _NOEXCEPT</a>
<a name="3514"><span class="lineNum">    3514 </span>                :            : {</a>
<a name="3515"><span class="lineNum">    3515 </span>                :            :     return !(nullptr &lt; __x);</a>
<a name="3516"><span class="lineNum">    3516 </span>                :            : }</a>
<a name="3517"><span class="lineNum">    3517 </span>                :            : </a>
<a name="3518"><span class="lineNum">    3518 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3519"><span class="lineNum">    3519 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3520"><span class="lineNum">    3520 </span>                :            : bool</a>
<a name="3521"><span class="lineNum">    3521 </span>                :            : operator&lt;=(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __x) _NOEXCEPT</a>
<a name="3522"><span class="lineNum">    3522 </span>                :            : {</a>
<a name="3523"><span class="lineNum">    3523 </span>                :            :     return !(__x &lt; nullptr);</a>
<a name="3524"><span class="lineNum">    3524 </span>                :            : }</a>
<a name="3525"><span class="lineNum">    3525 </span>                :            : </a>
<a name="3526"><span class="lineNum">    3526 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3527"><span class="lineNum">    3527 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3528"><span class="lineNum">    3528 </span>                :            : bool</a>
<a name="3529"><span class="lineNum">    3529 </span>                :            : operator&gt;=(const shared_ptr&lt;_Tp&gt;&amp; __x, nullptr_t) _NOEXCEPT</a>
<a name="3530"><span class="lineNum">    3530 </span>                :            : {</a>
<a name="3531"><span class="lineNum">    3531 </span>                :            :     return !(__x &lt; nullptr);</a>
<a name="3532"><span class="lineNum">    3532 </span>                :            : }</a>
<a name="3533"><span class="lineNum">    3533 </span>                :            : </a>
<a name="3534"><span class="lineNum">    3534 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3535"><span class="lineNum">    3535 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3536"><span class="lineNum">    3536 </span>                :            : bool</a>
<a name="3537"><span class="lineNum">    3537 </span>                :            : operator&gt;=(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __x) _NOEXCEPT</a>
<a name="3538"><span class="lineNum">    3538 </span>                :            : {</a>
<a name="3539"><span class="lineNum">    3539 </span>                :            :     return !(nullptr &lt; __x);</a>
<a name="3540"><span class="lineNum">    3540 </span>                :            : }</a>
<a name="3541"><span class="lineNum">    3541 </span>                :            : </a>
<a name="3542"><span class="lineNum">    3542 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3543"><span class="lineNum">    3543 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3544"><span class="lineNum">    3544 </span>                :            : void</a>
<a name="3545"><span class="lineNum">    3545 </span>                :            : swap(shared_ptr&lt;_Tp&gt;&amp; __x, shared_ptr&lt;_Tp&gt;&amp; __y) _NOEXCEPT</a>
<a name="3546"><span class="lineNum">    3546 </span>                :            : {</a>
<a name="3547"><span class="lineNum">    3547 </span>                :            :     __x.swap(__y);</a>
<a name="3548"><span class="lineNum">    3548 </span>                :            : }</a>
<a name="3549"><span class="lineNum">    3549 </span>                :            : </a>
<a name="3550"><span class="lineNum">    3550 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="3551"><span class="lineNum">    3551 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3552"><span class="lineNum">    3552 </span>                :            : shared_ptr&lt;_Tp&gt;</a>
<a name="3553"><span class="lineNum">    3553 </span>                :            : static_pointer_cast(const shared_ptr&lt;_Up&gt;&amp; __r) _NOEXCEPT</a>
<a name="3554"><span class="lineNum">    3554 </span>                :            : {</a>
<a name="3555"><span class="lineNum">    3555 </span>                :            :     return shared_ptr&lt;_Tp&gt;(__r,</a>
<a name="3556"><span class="lineNum">    3556 </span>                :            :                            static_cast&lt;</a>
<a name="3557"><span class="lineNum">    3557 </span>                :            :                                typename shared_ptr&lt;_Tp&gt;::element_type*&gt;(__r.get()));</a>
<a name="3558"><span class="lineNum">    3558 </span>                :            : }</a>
<a name="3559"><span class="lineNum">    3559 </span>                :            : </a>
<a name="3560"><span class="lineNum">    3560 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="3561"><span class="lineNum">    3561 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3562"><span class="lineNum">    3562 </span>                :            : shared_ptr&lt;_Tp&gt;</a>
<a name="3563"><span class="lineNum">    3563 </span>                :            : dynamic_pointer_cast(const shared_ptr&lt;_Up&gt;&amp; __r) _NOEXCEPT</a>
<a name="3564"><span class="lineNum">    3564 </span>                :            : {</a>
<a name="3565"><span class="lineNum">    3565 </span>                :            :     typedef typename shared_ptr&lt;_Tp&gt;::element_type _ET;</a>
<a name="3566"><span class="lineNum">    3566 </span>                :            :     _ET* __p = dynamic_cast&lt;_ET*&gt;(__r.get());</a>
<a name="3567"><span class="lineNum">    3567 </span>                :            :     return __p ? shared_ptr&lt;_Tp&gt;(__r, __p) : shared_ptr&lt;_Tp&gt;();</a>
<a name="3568"><span class="lineNum">    3568 </span>                :            : }</a>
<a name="3569"><span class="lineNum">    3569 </span>                :            : </a>
<a name="3570"><span class="lineNum">    3570 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="3571"><span class="lineNum">    3571 </span>                :            : shared_ptr&lt;_Tp&gt;</a>
<a name="3572"><span class="lineNum">    3572 </span>                :            : const_pointer_cast(const shared_ptr&lt;_Up&gt;&amp; __r) _NOEXCEPT</a>
<a name="3573"><span class="lineNum">    3573 </span>                :            : {</a>
<a name="3574"><span class="lineNum">    3574 </span>                :            :     typedef typename shared_ptr&lt;_Tp&gt;::element_type _RTp;</a>
<a name="3575"><span class="lineNum">    3575 </span>                :            :     return shared_ptr&lt;_Tp&gt;(__r, const_cast&lt;_RTp*&gt;(__r.get()));</a>
<a name="3576"><span class="lineNum">    3576 </span>                :            : }</a>
<a name="3577"><span class="lineNum">    3577 </span>                :            : </a>
<a name="3578"><span class="lineNum">    3578 </span>                :            : template&lt;class _Tp, class _Up&gt;</a>
<a name="3579"><span class="lineNum">    3579 </span>                :            : shared_ptr&lt;_Tp&gt;</a>
<a name="3580"><span class="lineNum">    3580 </span>                :            : reinterpret_pointer_cast(const shared_ptr&lt;_Up&gt;&amp; __r) _NOEXCEPT</a>
<a name="3581"><span class="lineNum">    3581 </span>                :            : {</a>
<a name="3582"><span class="lineNum">    3582 </span>                :            :     return shared_ptr&lt;_Tp&gt;(__r,</a>
<a name="3583"><span class="lineNum">    3583 </span>                :            :                            reinterpret_cast&lt;</a>
<a name="3584"><span class="lineNum">    3584 </span>                :            :                                typename shared_ptr&lt;_Tp&gt;::element_type*&gt;(__r.get()));</a>
<a name="3585"><span class="lineNum">    3585 </span>                :            : }</a>
<a name="3586"><span class="lineNum">    3586 </span>                :            : </a>
<a name="3587"><span class="lineNum">    3587 </span>                :            : #ifndef _LIBCPP_NO_RTTI</a>
<a name="3588"><span class="lineNum">    3588 </span>                :            : </a>
<a name="3589"><span class="lineNum">    3589 </span>                :            : template&lt;class _Dp, class _Tp&gt;</a>
<a name="3590"><span class="lineNum">    3590 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3591"><span class="lineNum">    3591 </span>                :            : _Dp*</a>
<a name="3592"><span class="lineNum">    3592 </span>                :            : get_deleter(const shared_ptr&lt;_Tp&gt;&amp; __p) _NOEXCEPT</a>
<a name="3593"><span class="lineNum">    3593 </span>                :            : {</a>
<a name="3594"><span class="lineNum">    3594 </span>                :            :     return __p.template __get_deleter&lt;_Dp&gt;();</a>
<a name="3595"><span class="lineNum">    3595 </span>                :            : }</a>
<a name="3596"><span class="lineNum">    3596 </span>                :            : </a>
<a name="3597"><span class="lineNum">    3597 </span>                :            : #endif  // _LIBCPP_NO_RTTI</a>
<a name="3598"><span class="lineNum">    3598 </span>                :            : </a>
<a name="3599"><span class="lineNum">    3599 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3600"><span class="lineNum">    3600 </span>                :            : class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr</a>
<a name="3601"><span class="lineNum">    3601 </span>                :            : {</a>
<a name="3602"><span class="lineNum">    3602 </span>                :            : public:</a>
<a name="3603"><span class="lineNum">    3603 </span>                :            :     typedef _Tp element_type;</a>
<a name="3604"><span class="lineNum">    3604 </span>                :            : private:</a>
<a name="3605"><span class="lineNum">    3605 </span>                :            :     element_type*        __ptr_;</a>
<a name="3606"><span class="lineNum">    3606 </span>                :            :     __shared_weak_count* __cntrl_;</a>
<a name="3607"><span class="lineNum">    3607 </span>                :            : </a>
<a name="3608"><span class="lineNum">    3608 </span>                :            : public:</a>
<a name="3609"><span class="lineNum">    3609 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3610"><span class="lineNum">    3610 </span>                :            :     _LIBCPP_CONSTEXPR weak_ptr() _NOEXCEPT;</a>
<a name="3611"><span class="lineNum">    3611 </span>                :            :     template&lt;class _Yp&gt; _LIBCPP_INLINE_VISIBILITY weak_ptr(shared_ptr&lt;_Yp&gt; const&amp; __r,</a>
<a name="3612"><span class="lineNum">    3612 </span>                :            :                    typename enable_if&lt;is_convertible&lt;_Yp*, _Tp*&gt;::value, __nat*&gt;::type = 0)</a>
<a name="3613"><span class="lineNum">    3613 </span>                :            :                         _NOEXCEPT;</a>
<a name="3614"><span class="lineNum">    3614 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3615"><span class="lineNum">    3615 </span>                :            :     weak_ptr(weak_ptr const&amp; __r) _NOEXCEPT;</a>
<a name="3616"><span class="lineNum">    3616 </span>                :            :     template&lt;class _Yp&gt; _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr&lt;_Yp&gt; const&amp; __r,</a>
<a name="3617"><span class="lineNum">    3617 </span>                :            :                    typename enable_if&lt;is_convertible&lt;_Yp*, _Tp*&gt;::value, __nat*&gt;::type = 0)</a>
<a name="3618"><span class="lineNum">    3618 </span>                :            :                          _NOEXCEPT;</a>
<a name="3619"><span class="lineNum">    3619 </span>                :            : </a>
<a name="3620"><span class="lineNum">    3620 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3621"><span class="lineNum">    3621 </span>                :            :     weak_ptr(weak_ptr&amp;&amp; __r) _NOEXCEPT;</a>
<a name="3622"><span class="lineNum">    3622 </span>                :            :     template&lt;class _Yp&gt; _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr&lt;_Yp&gt;&amp;&amp; __r,</a>
<a name="3623"><span class="lineNum">    3623 </span>                :            :                    typename enable_if&lt;is_convertible&lt;_Yp*, _Tp*&gt;::value, __nat*&gt;::type = 0)</a>
<a name="3624"><span class="lineNum">    3624 </span>                :            :                          _NOEXCEPT;</a>
<a name="3625"><span class="lineNum">    3625 </span>                :            :     ~weak_ptr();</a>
<a name="3626"><span class="lineNum">    3626 </span>                :            : </a>
<a name="3627"><span class="lineNum">    3627 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3628"><span class="lineNum">    3628 </span>                :            :     weak_ptr&amp; operator=(weak_ptr const&amp; __r) _NOEXCEPT;</a>
<a name="3629"><span class="lineNum">    3629 </span>                :            :     template&lt;class _Yp&gt;</a>
<a name="3630"><span class="lineNum">    3630 </span>                :            :         typename enable_if</a>
<a name="3631"><span class="lineNum">    3631 </span>                :            :         &lt;</a>
<a name="3632"><span class="lineNum">    3632 </span>                :            :             is_convertible&lt;_Yp*, element_type*&gt;::value,</a>
<a name="3633"><span class="lineNum">    3633 </span>                :            :             weak_ptr&amp;</a>
<a name="3634"><span class="lineNum">    3634 </span>                :            :         &gt;::type</a>
<a name="3635"><span class="lineNum">    3635 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="3636"><span class="lineNum">    3636 </span>                :            :         operator=(weak_ptr&lt;_Yp&gt; const&amp; __r) _NOEXCEPT;</a>
<a name="3637"><span class="lineNum">    3637 </span>                :            : </a>
<a name="3638"><span class="lineNum">    3638 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3639"><span class="lineNum">    3639 </span>                :            :     weak_ptr&amp; operator=(weak_ptr&amp;&amp; __r) _NOEXCEPT;</a>
<a name="3640"><span class="lineNum">    3640 </span>                :            :     template&lt;class _Yp&gt;</a>
<a name="3641"><span class="lineNum">    3641 </span>                :            :         typename enable_if</a>
<a name="3642"><span class="lineNum">    3642 </span>                :            :         &lt;</a>
<a name="3643"><span class="lineNum">    3643 </span>                :            :             is_convertible&lt;_Yp*, element_type*&gt;::value,</a>
<a name="3644"><span class="lineNum">    3644 </span>                :            :             weak_ptr&amp;</a>
<a name="3645"><span class="lineNum">    3645 </span>                :            :         &gt;::type</a>
<a name="3646"><span class="lineNum">    3646 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="3647"><span class="lineNum">    3647 </span>                :            :         operator=(weak_ptr&lt;_Yp&gt;&amp;&amp; __r) _NOEXCEPT;</a>
<a name="3648"><span class="lineNum">    3648 </span>                :            : </a>
<a name="3649"><span class="lineNum">    3649 </span>                :            :     template&lt;class _Yp&gt;</a>
<a name="3650"><span class="lineNum">    3650 </span>                :            :         typename enable_if</a>
<a name="3651"><span class="lineNum">    3651 </span>                :            :         &lt;</a>
<a name="3652"><span class="lineNum">    3652 </span>                :            :             is_convertible&lt;_Yp*, element_type*&gt;::value,</a>
<a name="3653"><span class="lineNum">    3653 </span>                :            :             weak_ptr&amp;</a>
<a name="3654"><span class="lineNum">    3654 </span>                :            :         &gt;::type</a>
<a name="3655"><span class="lineNum">    3655 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="3656"><span class="lineNum">    3656 </span>                :            :         operator=(shared_ptr&lt;_Yp&gt; const&amp; __r) _NOEXCEPT;</a>
<a name="3657"><span class="lineNum">    3657 </span>                :            : </a>
<a name="3658"><span class="lineNum">    3658 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3659"><span class="lineNum">    3659 </span>                :            :     void swap(weak_ptr&amp; __r) _NOEXCEPT;</a>
<a name="3660"><span class="lineNum">    3660 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3661"><span class="lineNum">    3661 </span>                :            :     void reset() _NOEXCEPT;</a>
<a name="3662"><span class="lineNum">    3662 </span>                :            : </a>
<a name="3663"><span class="lineNum">    3663 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3664"><span class="lineNum">    3664 </span>                :            :     long use_count() const _NOEXCEPT</a>
<a name="3665"><span class="lineNum">    3665 </span>                :            :         {return __cntrl_ ? __cntrl_-&gt;use_count() : 0;}</a>
<a name="3666"><span class="lineNum">    3666 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3667"><span class="lineNum">    3667 </span>                :            :     bool expired() const _NOEXCEPT</a>
<a name="3668"><span class="lineNum">    3668 </span>                :            :         {return __cntrl_ == nullptr || __cntrl_-&gt;use_count() == 0;}</a>
<a name="3669"><span class="lineNum">    3669 </span>                :            :     shared_ptr&lt;_Tp&gt; lock() const _NOEXCEPT;</a>
<a name="3670"><span class="lineNum">    3670 </span>                :            :     template&lt;class _Up&gt;</a>
<a name="3671"><span class="lineNum">    3671 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="3672"><span class="lineNum">    3672 </span>                :            :         bool owner_before(const shared_ptr&lt;_Up&gt;&amp; __r) const _NOEXCEPT</a>
<a name="3673"><span class="lineNum">    3673 </span>                :            :         {return __cntrl_ &lt; __r.__cntrl_;}</a>
<a name="3674"><span class="lineNum">    3674 </span>                :            :     template&lt;class _Up&gt;</a>
<a name="3675"><span class="lineNum">    3675 </span>                :            :         _LIBCPP_INLINE_VISIBILITY</a>
<a name="3676"><span class="lineNum">    3676 </span>                :            :         bool owner_before(const weak_ptr&lt;_Up&gt;&amp; __r) const _NOEXCEPT</a>
<a name="3677"><span class="lineNum">    3677 </span>                :            :         {return __cntrl_ &lt; __r.__cntrl_;}</a>
<a name="3678"><span class="lineNum">    3678 </span>                :            : </a>
<a name="3679"><span class="lineNum">    3679 </span>                :            :     template &lt;class _Up&gt; friend class _LIBCPP_TEMPLATE_VIS weak_ptr;</a>
<a name="3680"><span class="lineNum">    3680 </span>                :            :     template &lt;class _Up&gt; friend class _LIBCPP_TEMPLATE_VIS shared_ptr;</a>
<a name="3681"><span class="lineNum">    3681 </span>                :            : };</a>
<a name="3682"><span class="lineNum">    3682 </span>                :            : </a>
<a name="3683"><span class="lineNum">    3683 </span>                :            : #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES</a>
<a name="3684"><span class="lineNum">    3684 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3685"><span class="lineNum">    3685 </span>                :            : weak_ptr(shared_ptr&lt;_Tp&gt;) -&gt; weak_ptr&lt;_Tp&gt;;</a>
<a name="3686"><span class="lineNum">    3686 </span>                :            : #endif</a>
<a name="3687"><span class="lineNum">    3687 </span>                :            : </a>
<a name="3688"><span class="lineNum">    3688 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3689"><span class="lineNum">    3689 </span>                :            : inline</a>
<a name="3690"><span class="lineNum">    3690 </span>                :            : _LIBCPP_CONSTEXPR</a>
<a name="3691"><span class="lineNum">    3691 </span>                :            : weak_ptr&lt;_Tp&gt;::weak_ptr() _NOEXCEPT</a>
<a name="3692"><span class="lineNum">    3692 </span>                :            :     : __ptr_(nullptr),</a>
<a name="3693"><span class="lineNum">    3693 </span>                :            :       __cntrl_(nullptr)</a>
<a name="3694"><span class="lineNum">    3694 </span>                :            : {</a>
<a name="3695"><span class="lineNum">    3695 </span>                :            : }</a>
<a name="3696"><span class="lineNum">    3696 </span>                :            : </a>
<a name="3697"><span class="lineNum">    3697 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3698"><span class="lineNum">    3698 </span>                :            : inline</a>
<a name="3699"><span class="lineNum">    3699 </span>                :            : weak_ptr&lt;_Tp&gt;::weak_ptr(weak_ptr const&amp; __r) _NOEXCEPT</a>
<a name="3700"><span class="lineNum">    3700 </span>                :            :     : __ptr_(__r.__ptr_),</a>
<a name="3701"><span class="lineNum">    3701 </span>                :            :       __cntrl_(__r.__cntrl_)</a>
<a name="3702"><span class="lineNum">    3702 </span>                :            : {</a>
<a name="3703"><span class="lineNum">    3703 </span>                :            :     if (__cntrl_)</a>
<a name="3704"><span class="lineNum">    3704 </span>                :            :         __cntrl_-&gt;__add_weak();</a>
<a name="3705"><span class="lineNum">    3705 </span>                :            : }</a>
<a name="3706"><span class="lineNum">    3706 </span>                :            : </a>
<a name="3707"><span class="lineNum">    3707 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3708"><span class="lineNum">    3708 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3709"><span class="lineNum">    3709 </span>                :            : inline</a>
<a name="3710"><span class="lineNum">    3710 </span>                :            : weak_ptr&lt;_Tp&gt;::weak_ptr(shared_ptr&lt;_Yp&gt; const&amp; __r,</a>
<a name="3711"><span class="lineNum">    3711 </span>                :            :                         typename enable_if&lt;is_convertible&lt;_Yp*, _Tp*&gt;::value, __nat*&gt;::type)</a>
<a name="3712"><span class="lineNum">    3712 </span>                :            :                          _NOEXCEPT</a>
<a name="3713"><span class="lineNum">    3713 </span>                :            :     : __ptr_(__r.__ptr_),</a>
<a name="3714"><span class="lineNum">    3714 </span>                :            :       __cntrl_(__r.__cntrl_)</a>
<a name="3715"><span class="lineNum">    3715 </span>                :            : {</a>
<a name="3716"><span class="lineNum">    3716 </span>                :            :     if (__cntrl_)</a>
<a name="3717"><span class="lineNum">    3717 </span>                :            :         __cntrl_-&gt;__add_weak();</a>
<a name="3718"><span class="lineNum">    3718 </span>                :            : }</a>
<a name="3719"><span class="lineNum">    3719 </span>                :            : </a>
<a name="3720"><span class="lineNum">    3720 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3721"><span class="lineNum">    3721 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3722"><span class="lineNum">    3722 </span>                :            : inline</a>
<a name="3723"><span class="lineNum">    3723 </span>                :            : weak_ptr&lt;_Tp&gt;::weak_ptr(weak_ptr&lt;_Yp&gt; const&amp; __r,</a>
<a name="3724"><span class="lineNum">    3724 </span>                :            :                         typename enable_if&lt;is_convertible&lt;_Yp*, _Tp*&gt;::value, __nat*&gt;::type)</a>
<a name="3725"><span class="lineNum">    3725 </span>                :            :          _NOEXCEPT</a>
<a name="3726"><span class="lineNum">    3726 </span>                :            :     : __ptr_(__r.__ptr_),</a>
<a name="3727"><span class="lineNum">    3727 </span>                :            :       __cntrl_(__r.__cntrl_)</a>
<a name="3728"><span class="lineNum">    3728 </span>                :            : {</a>
<a name="3729"><span class="lineNum">    3729 </span>                :            :     if (__cntrl_)</a>
<a name="3730"><span class="lineNum">    3730 </span>                :            :         __cntrl_-&gt;__add_weak();</a>
<a name="3731"><span class="lineNum">    3731 </span>                :            : }</a>
<a name="3732"><span class="lineNum">    3732 </span>                :            : </a>
<a name="3733"><span class="lineNum">    3733 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3734"><span class="lineNum">    3734 </span>                :            : inline</a>
<a name="3735"><span class="lineNum">    3735 </span>                :            : weak_ptr&lt;_Tp&gt;::weak_ptr(weak_ptr&amp;&amp; __r) _NOEXCEPT</a>
<a name="3736"><span class="lineNum">    3736 </span>                :            :     : __ptr_(__r.__ptr_),</a>
<a name="3737"><span class="lineNum">    3737 </span>                :            :       __cntrl_(__r.__cntrl_)</a>
<a name="3738"><span class="lineNum">    3738 </span>                :            : {</a>
<a name="3739"><span class="lineNum">    3739 </span>                :            :     __r.__ptr_ = nullptr;</a>
<a name="3740"><span class="lineNum">    3740 </span>                :            :     __r.__cntrl_ = nullptr;</a>
<a name="3741"><span class="lineNum">    3741 </span>                :            : }</a>
<a name="3742"><span class="lineNum">    3742 </span>                :            : </a>
<a name="3743"><span class="lineNum">    3743 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3744"><span class="lineNum">    3744 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3745"><span class="lineNum">    3745 </span>                :            : inline</a>
<a name="3746"><span class="lineNum">    3746 </span>                :            : weak_ptr&lt;_Tp&gt;::weak_ptr(weak_ptr&lt;_Yp&gt;&amp;&amp; __r,</a>
<a name="3747"><span class="lineNum">    3747 </span>                :            :                         typename enable_if&lt;is_convertible&lt;_Yp*, _Tp*&gt;::value, __nat*&gt;::type)</a>
<a name="3748"><span class="lineNum">    3748 </span>                :            :          _NOEXCEPT</a>
<a name="3749"><span class="lineNum">    3749 </span>                :            :     : __ptr_(__r.__ptr_),</a>
<a name="3750"><span class="lineNum">    3750 </span>                :            :       __cntrl_(__r.__cntrl_)</a>
<a name="3751"><span class="lineNum">    3751 </span>                :            : {</a>
<a name="3752"><span class="lineNum">    3752 </span>                :            :     __r.__ptr_ = nullptr;</a>
<a name="3753"><span class="lineNum">    3753 </span>                :            :     __r.__cntrl_ = nullptr;</a>
<a name="3754"><span class="lineNum">    3754 </span>                :            : }</a>
<a name="3755"><span class="lineNum">    3755 </span>                :            : </a>
<a name="3756"><span class="lineNum">    3756 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3757"><span class="lineNum">    3757 </span>                :            : weak_ptr&lt;_Tp&gt;::~weak_ptr()</a>
<a name="3758"><span class="lineNum">    3758 </span>                :            : {</a>
<a name="3759"><span class="lineNum">    3759 </span>                :            :     if (__cntrl_)</a>
<a name="3760"><span class="lineNum">    3760 </span>                :            :         __cntrl_-&gt;__release_weak();</a>
<a name="3761"><span class="lineNum">    3761 </span>                :            : }</a>
<a name="3762"><span class="lineNum">    3762 </span>                :            : </a>
<a name="3763"><span class="lineNum">    3763 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3764"><span class="lineNum">    3764 </span>                :            : inline</a>
<a name="3765"><span class="lineNum">    3765 </span>                :            : weak_ptr&lt;_Tp&gt;&amp;</a>
<a name="3766"><span class="lineNum">    3766 </span>                :            : weak_ptr&lt;_Tp&gt;::operator=(weak_ptr const&amp; __r) _NOEXCEPT</a>
<a name="3767"><span class="lineNum">    3767 </span>                :            : {</a>
<a name="3768"><span class="lineNum">    3768 </span>                :            :     weak_ptr(__r).swap(*this);</a>
<a name="3769"><span class="lineNum">    3769 </span>                :            :     return *this;</a>
<a name="3770"><span class="lineNum">    3770 </span>                :            : }</a>
<a name="3771"><span class="lineNum">    3771 </span>                :            : </a>
<a name="3772"><span class="lineNum">    3772 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3773"><span class="lineNum">    3773 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3774"><span class="lineNum">    3774 </span>                :            : inline</a>
<a name="3775"><span class="lineNum">    3775 </span>                :            : typename enable_if</a>
<a name="3776"><span class="lineNum">    3776 </span>                :            : &lt;</a>
<a name="3777"><span class="lineNum">    3777 </span>                :            :     is_convertible&lt;_Yp*, _Tp*&gt;::value,</a>
<a name="3778"><span class="lineNum">    3778 </span>                :            :     weak_ptr&lt;_Tp&gt;&amp;</a>
<a name="3779"><span class="lineNum">    3779 </span>                :            : &gt;::type</a>
<a name="3780"><span class="lineNum">    3780 </span>                :            : weak_ptr&lt;_Tp&gt;::operator=(weak_ptr&lt;_Yp&gt; const&amp; __r) _NOEXCEPT</a>
<a name="3781"><span class="lineNum">    3781 </span>                :            : {</a>
<a name="3782"><span class="lineNum">    3782 </span>                :            :     weak_ptr(__r).swap(*this);</a>
<a name="3783"><span class="lineNum">    3783 </span>                :            :     return *this;</a>
<a name="3784"><span class="lineNum">    3784 </span>                :            : }</a>
<a name="3785"><span class="lineNum">    3785 </span>                :            : </a>
<a name="3786"><span class="lineNum">    3786 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3787"><span class="lineNum">    3787 </span>                :            : inline</a>
<a name="3788"><span class="lineNum">    3788 </span>                :            : weak_ptr&lt;_Tp&gt;&amp;</a>
<a name="3789"><span class="lineNum">    3789 </span>                :            : weak_ptr&lt;_Tp&gt;::operator=(weak_ptr&amp;&amp; __r) _NOEXCEPT</a>
<a name="3790"><span class="lineNum">    3790 </span>                :            : {</a>
<a name="3791"><span class="lineNum">    3791 </span>                :            :     weak_ptr(_VSTD::move(__r)).swap(*this);</a>
<a name="3792"><span class="lineNum">    3792 </span>                :            :     return *this;</a>
<a name="3793"><span class="lineNum">    3793 </span>                :            : }</a>
<a name="3794"><span class="lineNum">    3794 </span>                :            : </a>
<a name="3795"><span class="lineNum">    3795 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3796"><span class="lineNum">    3796 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3797"><span class="lineNum">    3797 </span>                :            : inline</a>
<a name="3798"><span class="lineNum">    3798 </span>                :            : typename enable_if</a>
<a name="3799"><span class="lineNum">    3799 </span>                :            : &lt;</a>
<a name="3800"><span class="lineNum">    3800 </span>                :            :     is_convertible&lt;_Yp*, _Tp*&gt;::value,</a>
<a name="3801"><span class="lineNum">    3801 </span>                :            :     weak_ptr&lt;_Tp&gt;&amp;</a>
<a name="3802"><span class="lineNum">    3802 </span>                :            : &gt;::type</a>
<a name="3803"><span class="lineNum">    3803 </span>                :            : weak_ptr&lt;_Tp&gt;::operator=(weak_ptr&lt;_Yp&gt;&amp;&amp; __r) _NOEXCEPT</a>
<a name="3804"><span class="lineNum">    3804 </span>                :            : {</a>
<a name="3805"><span class="lineNum">    3805 </span>                :            :     weak_ptr(_VSTD::move(__r)).swap(*this);</a>
<a name="3806"><span class="lineNum">    3806 </span>                :            :     return *this;</a>
<a name="3807"><span class="lineNum">    3807 </span>                :            : }</a>
<a name="3808"><span class="lineNum">    3808 </span>                :            : </a>
<a name="3809"><span class="lineNum">    3809 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3810"><span class="lineNum">    3810 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3811"><span class="lineNum">    3811 </span>                :            : inline</a>
<a name="3812"><span class="lineNum">    3812 </span>                :            : typename enable_if</a>
<a name="3813"><span class="lineNum">    3813 </span>                :            : &lt;</a>
<a name="3814"><span class="lineNum">    3814 </span>                :            :     is_convertible&lt;_Yp*, _Tp*&gt;::value,</a>
<a name="3815"><span class="lineNum">    3815 </span>                :            :     weak_ptr&lt;_Tp&gt;&amp;</a>
<a name="3816"><span class="lineNum">    3816 </span>                :            : &gt;::type</a>
<a name="3817"><span class="lineNum">    3817 </span>                :            : weak_ptr&lt;_Tp&gt;::operator=(shared_ptr&lt;_Yp&gt; const&amp; __r) _NOEXCEPT</a>
<a name="3818"><span class="lineNum">    3818 </span>                :            : {</a>
<a name="3819"><span class="lineNum">    3819 </span>                :            :     weak_ptr(__r).swap(*this);</a>
<a name="3820"><span class="lineNum">    3820 </span>                :            :     return *this;</a>
<a name="3821"><span class="lineNum">    3821 </span>                :            : }</a>
<a name="3822"><span class="lineNum">    3822 </span>                :            : </a>
<a name="3823"><span class="lineNum">    3823 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3824"><span class="lineNum">    3824 </span>                :            : inline</a>
<a name="3825"><span class="lineNum">    3825 </span>                :            : void</a>
<a name="3826"><span class="lineNum">    3826 </span>                :            : weak_ptr&lt;_Tp&gt;::swap(weak_ptr&amp; __r) _NOEXCEPT</a>
<a name="3827"><span class="lineNum">    3827 </span>                :            : {</a>
<a name="3828"><span class="lineNum">    3828 </span>                :            :     _VSTD::swap(__ptr_, __r.__ptr_);</a>
<a name="3829"><span class="lineNum">    3829 </span>                :            :     _VSTD::swap(__cntrl_, __r.__cntrl_);</a>
<a name="3830"><span class="lineNum">    3830 </span>                :            : }</a>
<a name="3831"><span class="lineNum">    3831 </span>                :            : </a>
<a name="3832"><span class="lineNum">    3832 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3833"><span class="lineNum">    3833 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3834"><span class="lineNum">    3834 </span>                :            : void</a>
<a name="3835"><span class="lineNum">    3835 </span>                :            : swap(weak_ptr&lt;_Tp&gt;&amp; __x, weak_ptr&lt;_Tp&gt;&amp; __y) _NOEXCEPT</a>
<a name="3836"><span class="lineNum">    3836 </span>                :            : {</a>
<a name="3837"><span class="lineNum">    3837 </span>                :            :     __x.swap(__y);</a>
<a name="3838"><span class="lineNum">    3838 </span>                :            : }</a>
<a name="3839"><span class="lineNum">    3839 </span>                :            : </a>
<a name="3840"><span class="lineNum">    3840 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3841"><span class="lineNum">    3841 </span>                :            : inline</a>
<a name="3842"><span class="lineNum">    3842 </span>                :            : void</a>
<a name="3843"><span class="lineNum">    3843 </span>                :            : weak_ptr&lt;_Tp&gt;::reset() _NOEXCEPT</a>
<a name="3844"><span class="lineNum">    3844 </span>                :            : {</a>
<a name="3845"><span class="lineNum">    3845 </span>                :            :     weak_ptr().swap(*this);</a>
<a name="3846"><span class="lineNum">    3846 </span>                :            : }</a>
<a name="3847"><span class="lineNum">    3847 </span>                :            : </a>
<a name="3848"><span class="lineNum">    3848 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3849"><span class="lineNum">    3849 </span>                :            : template&lt;class _Yp&gt;</a>
<a name="3850"><span class="lineNum">    3850 </span>                :            : shared_ptr&lt;_Tp&gt;::shared_ptr(const weak_ptr&lt;_Yp&gt;&amp; __r,</a>
<a name="3851"><span class="lineNum">    3851 </span>                :            :                             typename enable_if&lt;is_convertible&lt;_Yp*, element_type*&gt;::value, __nat&gt;::type)</a>
<a name="3852"><span class="lineNum">    3852 </span>                :            :     : __ptr_(__r.__ptr_),</a>
<a name="3853"><span class="lineNum">    3853 </span>                :            :       __cntrl_(__r.__cntrl_ ? __r.__cntrl_-&gt;lock() : __r.__cntrl_)</a>
<a name="3854"><span class="lineNum">    3854 </span>                :            : {</a>
<a name="3855"><span class="lineNum">    3855 </span>                :            :     if (__cntrl_ == nullptr)</a>
<a name="3856"><span class="lineNum">    3856 </span>                :            :         __throw_bad_weak_ptr();</a>
<a name="3857"><span class="lineNum">    3857 </span>                :            : }</a>
<a name="3858"><span class="lineNum">    3858 </span>                :            : </a>
<a name="3859"><span class="lineNum">    3859 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3860"><span class="lineNum">    3860 </span>                :            : shared_ptr&lt;_Tp&gt;</a>
<a name="3861"><span class="lineNum">    3861 </span>                :            : weak_ptr&lt;_Tp&gt;::lock() const _NOEXCEPT</a>
<a name="3862"><span class="lineNum">    3862 </span>                :            : {</a>
<a name="3863"><span class="lineNum">    3863 </span>                :            :     shared_ptr&lt;_Tp&gt; __r;</a>
<a name="3864"><span class="lineNum">    3864 </span>                :            :     __r.__cntrl_ = __cntrl_ ? __cntrl_-&gt;lock() : __cntrl_;</a>
<a name="3865"><span class="lineNum">    3865 </span>                :            :     if (__r.__cntrl_)</a>
<a name="3866"><span class="lineNum">    3866 </span>                :            :         __r.__ptr_ = __ptr_;</a>
<a name="3867"><span class="lineNum">    3867 </span>                :            :     return __r;</a>
<a name="3868"><span class="lineNum">    3868 </span>                :            : }</a>
<a name="3869"><span class="lineNum">    3869 </span>                :            : </a>
<a name="3870"><span class="lineNum">    3870 </span>                :            : #if _LIBCPP_STD_VER &gt; 14</a>
<a name="3871"><span class="lineNum">    3871 </span>                :            : template &lt;class _Tp = void&gt; struct owner_less;</a>
<a name="3872"><span class="lineNum">    3872 </span>                :            : #else</a>
<a name="3873"><span class="lineNum">    3873 </span>                :            : template &lt;class _Tp&gt; struct owner_less;</a>
<a name="3874"><span class="lineNum">    3874 </span>                :            : #endif</a>
<a name="3875"><span class="lineNum">    3875 </span>                :            : </a>
<a name="3876"><span class="lineNum">    3876 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="3877"><span class="lineNum">    3877 </span>                :            : struct _LIBCPP_TEMPLATE_VIS owner_less&lt;shared_ptr&lt;_Tp&gt; &gt;</a>
<a name="3878"><span class="lineNum">    3878 </span>                :            :     : binary_function&lt;shared_ptr&lt;_Tp&gt;, shared_ptr&lt;_Tp&gt;, bool&gt;</a>
<a name="3879"><span class="lineNum">    3879 </span>                :            : {</a>
<a name="3880"><span class="lineNum">    3880 </span>                :            :     typedef bool result_type;</a>
<a name="3881"><span class="lineNum">    3881 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3882"><span class="lineNum">    3882 </span>                :            :     bool operator()(shared_ptr&lt;_Tp&gt; const&amp; __x, shared_ptr&lt;_Tp&gt; const&amp; __y) const _NOEXCEPT</a>
<a name="3883"><span class="lineNum">    3883 </span>                :            :         {return __x.owner_before(__y);}</a>
<a name="3884"><span class="lineNum">    3884 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3885"><span class="lineNum">    3885 </span>                :            :     bool operator()(shared_ptr&lt;_Tp&gt; const&amp; __x,   weak_ptr&lt;_Tp&gt; const&amp; __y) const _NOEXCEPT</a>
<a name="3886"><span class="lineNum">    3886 </span>                :            :         {return __x.owner_before(__y);}</a>
<a name="3887"><span class="lineNum">    3887 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3888"><span class="lineNum">    3888 </span>                :            :     bool operator()(  weak_ptr&lt;_Tp&gt; const&amp; __x, shared_ptr&lt;_Tp&gt; const&amp; __y) const _NOEXCEPT</a>
<a name="3889"><span class="lineNum">    3889 </span>                :            :         {return __x.owner_before(__y);}</a>
<a name="3890"><span class="lineNum">    3890 </span>                :            : };</a>
<a name="3891"><span class="lineNum">    3891 </span>                :            : </a>
<a name="3892"><span class="lineNum">    3892 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="3893"><span class="lineNum">    3893 </span>                :            : struct _LIBCPP_TEMPLATE_VIS owner_less&lt;weak_ptr&lt;_Tp&gt; &gt;</a>
<a name="3894"><span class="lineNum">    3894 </span>                :            :     : binary_function&lt;weak_ptr&lt;_Tp&gt;, weak_ptr&lt;_Tp&gt;, bool&gt;</a>
<a name="3895"><span class="lineNum">    3895 </span>                :            : {</a>
<a name="3896"><span class="lineNum">    3896 </span>                :            :     typedef bool result_type;</a>
<a name="3897"><span class="lineNum">    3897 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3898"><span class="lineNum">    3898 </span>                :            :     bool operator()(  weak_ptr&lt;_Tp&gt; const&amp; __x,   weak_ptr&lt;_Tp&gt; const&amp; __y) const _NOEXCEPT</a>
<a name="3899"><span class="lineNum">    3899 </span>                :            :         {return __x.owner_before(__y);}</a>
<a name="3900"><span class="lineNum">    3900 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3901"><span class="lineNum">    3901 </span>                :            :     bool operator()(shared_ptr&lt;_Tp&gt; const&amp; __x,   weak_ptr&lt;_Tp&gt; const&amp; __y) const _NOEXCEPT</a>
<a name="3902"><span class="lineNum">    3902 </span>                :            :         {return __x.owner_before(__y);}</a>
<a name="3903"><span class="lineNum">    3903 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3904"><span class="lineNum">    3904 </span>                :            :     bool operator()(  weak_ptr&lt;_Tp&gt; const&amp; __x, shared_ptr&lt;_Tp&gt; const&amp; __y) const _NOEXCEPT</a>
<a name="3905"><span class="lineNum">    3905 </span>                :            :         {return __x.owner_before(__y);}</a>
<a name="3906"><span class="lineNum">    3906 </span>                :            : };</a>
<a name="3907"><span class="lineNum">    3907 </span>                :            : </a>
<a name="3908"><span class="lineNum">    3908 </span>                :            : #if _LIBCPP_STD_VER &gt; 14</a>
<a name="3909"><span class="lineNum">    3909 </span>                :            : template &lt;&gt;</a>
<a name="3910"><span class="lineNum">    3910 </span>                :            : struct _LIBCPP_TEMPLATE_VIS owner_less&lt;void&gt;</a>
<a name="3911"><span class="lineNum">    3911 </span>                :            : {</a>
<a name="3912"><span class="lineNum">    3912 </span>                :            :     template &lt;class _Tp, class _Up&gt;</a>
<a name="3913"><span class="lineNum">    3913 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3914"><span class="lineNum">    3914 </span>                :            :     bool operator()( shared_ptr&lt;_Tp&gt; const&amp; __x, shared_ptr&lt;_Up&gt; const&amp; __y) const _NOEXCEPT</a>
<a name="3915"><span class="lineNum">    3915 </span>                :            :         {return __x.owner_before(__y);}</a>
<a name="3916"><span class="lineNum">    3916 </span>                :            :     template &lt;class _Tp, class _Up&gt;</a>
<a name="3917"><span class="lineNum">    3917 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3918"><span class="lineNum">    3918 </span>                :            :     bool operator()( shared_ptr&lt;_Tp&gt; const&amp; __x,   weak_ptr&lt;_Up&gt; const&amp; __y) const _NOEXCEPT</a>
<a name="3919"><span class="lineNum">    3919 </span>                :            :         {return __x.owner_before(__y);}</a>
<a name="3920"><span class="lineNum">    3920 </span>                :            :     template &lt;class _Tp, class _Up&gt;</a>
<a name="3921"><span class="lineNum">    3921 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3922"><span class="lineNum">    3922 </span>                :            :     bool operator()(   weak_ptr&lt;_Tp&gt; const&amp; __x, shared_ptr&lt;_Up&gt; const&amp; __y) const _NOEXCEPT</a>
<a name="3923"><span class="lineNum">    3923 </span>                :            :         {return __x.owner_before(__y);}</a>
<a name="3924"><span class="lineNum">    3924 </span>                :            :     template &lt;class _Tp, class _Up&gt;</a>
<a name="3925"><span class="lineNum">    3925 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3926"><span class="lineNum">    3926 </span>                :            :     bool operator()(   weak_ptr&lt;_Tp&gt; const&amp; __x,   weak_ptr&lt;_Up&gt; const&amp; __y) const _NOEXCEPT</a>
<a name="3927"><span class="lineNum">    3927 </span>                :            :         {return __x.owner_before(__y);}</a>
<a name="3928"><span class="lineNum">    3928 </span>                :            :     typedef void is_transparent;</a>
<a name="3929"><span class="lineNum">    3929 </span>                :            : };</a>
<a name="3930"><span class="lineNum">    3930 </span>                :            : #endif</a>
<a name="3931"><span class="lineNum">    3931 </span>                :            : </a>
<a name="3932"><span class="lineNum">    3932 </span>                :            : template&lt;class _Tp&gt;</a>
<a name="3933"><span class="lineNum">    3933 </span>                :            : class _LIBCPP_TEMPLATE_VIS enable_shared_from_this</a>
<a name="3934"><span class="lineNum">    3934 </span>                :            : {</a>
<a name="3935"><span class="lineNum">    3935 </span>                :            :     mutable weak_ptr&lt;_Tp&gt; __weak_this_;</a>
<a name="3936"><span class="lineNum">    3936 </span>                :            : protected:</a>
<a name="3937"><span class="lineNum">    3937 </span>                :            :     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR</a>
<a name="3938"><span class="lineNum">    3938 </span>                :            :     enable_shared_from_this() _NOEXCEPT {}</a>
<a name="3939"><span class="lineNum">    3939 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3940"><span class="lineNum">    3940 </span>                :            :     enable_shared_from_this(enable_shared_from_this const&amp;) _NOEXCEPT {}</a>
<a name="3941"><span class="lineNum">    3941 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3942"><span class="lineNum">    3942 </span>                :            :     enable_shared_from_this&amp; operator=(enable_shared_from_this const&amp;) _NOEXCEPT</a>
<a name="3943"><span class="lineNum">    3943 </span>                :            :         {return *this;}</a>
<a name="3944"><span class="lineNum">    3944 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3945"><span class="lineNum">    3945 </span>                :            :     ~enable_shared_from_this() {}</a>
<a name="3946"><span class="lineNum">    3946 </span>                :            : public:</a>
<a name="3947"><span class="lineNum">    3947 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3948"><span class="lineNum">    3948 </span>                :            :     shared_ptr&lt;_Tp&gt; shared_from_this()</a>
<a name="3949"><span class="lineNum">    3949 </span>                :            :         {return shared_ptr&lt;_Tp&gt;(__weak_this_);}</a>
<a name="3950"><span class="lineNum">    3950 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3951"><span class="lineNum">    3951 </span>                :            :     shared_ptr&lt;_Tp const&gt; shared_from_this() const</a>
<a name="3952"><span class="lineNum">    3952 </span>                :            :         {return shared_ptr&lt;const _Tp&gt;(__weak_this_);}</a>
<a name="3953"><span class="lineNum">    3953 </span>                :            : </a>
<a name="3954"><span class="lineNum">    3954 </span>                :            : #if _LIBCPP_STD_VER &gt; 14</a>
<a name="3955"><span class="lineNum">    3955 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3956"><span class="lineNum">    3956 </span>                :            :     weak_ptr&lt;_Tp&gt; weak_from_this() _NOEXCEPT</a>
<a name="3957"><span class="lineNum">    3957 </span>                :            :        { return __weak_this_; }</a>
<a name="3958"><span class="lineNum">    3958 </span>                :            : </a>
<a name="3959"><span class="lineNum">    3959 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3960"><span class="lineNum">    3960 </span>                :            :     weak_ptr&lt;const _Tp&gt; weak_from_this() const _NOEXCEPT</a>
<a name="3961"><span class="lineNum">    3961 </span>                :            :         { return __weak_this_; }</a>
<a name="3962"><span class="lineNum">    3962 </span>                :            : #endif // _LIBCPP_STD_VER &gt; 14</a>
<a name="3963"><span class="lineNum">    3963 </span>                :            : </a>
<a name="3964"><span class="lineNum">    3964 </span>                :            :     template &lt;class _Up&gt; friend class shared_ptr;</a>
<a name="3965"><span class="lineNum">    3965 </span>                :            : };</a>
<a name="3966"><span class="lineNum">    3966 </span>                :            : </a>
<a name="3967"><span class="lineNum">    3967 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="3968"><span class="lineNum">    3968 </span>                :            : struct _LIBCPP_TEMPLATE_VIS hash&lt;shared_ptr&lt;_Tp&gt; &gt;</a>
<a name="3969"><span class="lineNum">    3969 </span>                :            : {</a>
<a name="3970"><span class="lineNum">    3970 </span>                :            :     typedef shared_ptr&lt;_Tp&gt;      argument_type;</a>
<a name="3971"><span class="lineNum">    3971 </span>                :            :     typedef size_t               result_type;</a>
<a name="3972"><span class="lineNum">    3972 </span>                :            : </a>
<a name="3973"><span class="lineNum">    3973 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="3974"><span class="lineNum">    3974 </span>                :            :     result_type operator()(const argument_type&amp; __ptr) const _NOEXCEPT</a>
<a name="3975"><span class="lineNum">    3975 </span>                :            :     {</a>
<a name="3976"><span class="lineNum">    3976 </span>                :            :         return hash&lt;typename shared_ptr&lt;_Tp&gt;::element_type*&gt;()(__ptr.get());</a>
<a name="3977"><span class="lineNum">    3977 </span>                :            :     }</a>
<a name="3978"><span class="lineNum">    3978 </span>                :            : };</a>
<a name="3979"><span class="lineNum">    3979 </span>                :            : </a>
<a name="3980"><span class="lineNum">    3980 </span>                :            : template&lt;class _CharT, class _Traits, class _Yp&gt;</a>
<a name="3981"><span class="lineNum">    3981 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="3982"><span class="lineNum">    3982 </span>                :            : basic_ostream&lt;_CharT, _Traits&gt;&amp;</a>
<a name="3983"><span class="lineNum">    3983 </span>                :            : operator&lt;&lt;(basic_ostream&lt;_CharT, _Traits&gt;&amp; __os, shared_ptr&lt;_Yp&gt; const&amp; __p);</a>
<a name="3984"><span class="lineNum">    3984 </span>                :            : </a>
<a name="3985"><span class="lineNum">    3985 </span>                :            : </a>
<a name="3986"><span class="lineNum">    3986 </span>                :            : #if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)</a>
<a name="3987"><span class="lineNum">    3987 </span>                :            : </a>
<a name="3988"><span class="lineNum">    3988 </span>                :            : class _LIBCPP_TYPE_VIS __sp_mut</a>
<a name="3989"><span class="lineNum">    3989 </span>                :            : {</a>
<a name="3990"><span class="lineNum">    3990 </span>                :            :     void* __lx;</a>
<a name="3991"><span class="lineNum">    3991 </span>                :            : public:</a>
<a name="3992"><span class="lineNum">    3992 </span>                :            :     void lock() _NOEXCEPT;</a>
<a name="3993"><span class="lineNum">    3993 </span>                :            :     void unlock() _NOEXCEPT;</a>
<a name="3994"><span class="lineNum">    3994 </span>                :            : </a>
<a name="3995"><span class="lineNum">    3995 </span>                :            : private:</a>
<a name="3996"><span class="lineNum">    3996 </span>                :            :     _LIBCPP_CONSTEXPR __sp_mut(void*) _NOEXCEPT;</a>
<a name="3997"><span class="lineNum">    3997 </span>                :            :     __sp_mut(const __sp_mut&amp;);</a>
<a name="3998"><span class="lineNum">    3998 </span>                :            :     __sp_mut&amp; operator=(const __sp_mut&amp;);</a>
<a name="3999"><span class="lineNum">    3999 </span>                :            : </a>
<a name="4000"><span class="lineNum">    4000 </span>                :            :     friend _LIBCPP_FUNC_VIS __sp_mut&amp; __get_sp_mut(const void*);</a>
<a name="4001"><span class="lineNum">    4001 </span>                :            : };</a>
<a name="4002"><span class="lineNum">    4002 </span>                :            : </a>
<a name="4003"><span class="lineNum">    4003 </span>                :            : _LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4004"><span class="lineNum">    4004 </span>                :            : __sp_mut&amp; __get_sp_mut(const void*);</a>
<a name="4005"><span class="lineNum">    4005 </span>                :            : </a>
<a name="4006"><span class="lineNum">    4006 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4007"><span class="lineNum">    4007 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4008"><span class="lineNum">    4008 </span>                :            : bool</a>
<a name="4009"><span class="lineNum">    4009 </span>                :            : atomic_is_lock_free(const shared_ptr&lt;_Tp&gt;*)</a>
<a name="4010"><span class="lineNum">    4010 </span>                :            : {</a>
<a name="4011"><span class="lineNum">    4011 </span>                :            :     return false;</a>
<a name="4012"><span class="lineNum">    4012 </span>                :            : }</a>
<a name="4013"><span class="lineNum">    4013 </span>                :            : </a>
<a name="4014"><span class="lineNum">    4014 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4015"><span class="lineNum">    4015 </span>                :            : _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4016"><span class="lineNum">    4016 </span>                :            : shared_ptr&lt;_Tp&gt;</a>
<a name="4017"><span class="lineNum">    4017 </span>                :            : atomic_load(const shared_ptr&lt;_Tp&gt;* __p)</a>
<a name="4018"><span class="lineNum">    4018 </span>                :            : {</a>
<a name="4019"><span class="lineNum">    4019 </span>                :            :     __sp_mut&amp; __m = __get_sp_mut(__p);</a>
<a name="4020"><span class="lineNum">    4020 </span>                :            :     __m.lock();</a>
<a name="4021"><span class="lineNum">    4021 </span>                :            :     shared_ptr&lt;_Tp&gt; __q = *__p;</a>
<a name="4022"><span class="lineNum">    4022 </span>                :            :     __m.unlock();</a>
<a name="4023"><span class="lineNum">    4023 </span>                :            :     return __q;</a>
<a name="4024"><span class="lineNum">    4024 </span>                :            : }</a>
<a name="4025"><span class="lineNum">    4025 </span>                :            : </a>
<a name="4026"><span class="lineNum">    4026 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4027"><span class="lineNum">    4027 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4028"><span class="lineNum">    4028 </span>                :            : _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4029"><span class="lineNum">    4029 </span>                :            : shared_ptr&lt;_Tp&gt;</a>
<a name="4030"><span class="lineNum">    4030 </span>                :            : atomic_load_explicit(const shared_ptr&lt;_Tp&gt;* __p, memory_order)</a>
<a name="4031"><span class="lineNum">    4031 </span>                :            : {</a>
<a name="4032"><span class="lineNum">    4032 </span>                :            :     return atomic_load(__p);</a>
<a name="4033"><span class="lineNum">    4033 </span>                :            : }</a>
<a name="4034"><span class="lineNum">    4034 </span>                :            : </a>
<a name="4035"><span class="lineNum">    4035 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4036"><span class="lineNum">    4036 </span>                :            : _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4037"><span class="lineNum">    4037 </span>                :            : void</a>
<a name="4038"><span class="lineNum">    4038 </span>                :            : atomic_store(shared_ptr&lt;_Tp&gt;* __p, shared_ptr&lt;_Tp&gt; __r)</a>
<a name="4039"><span class="lineNum">    4039 </span>                :            : {</a>
<a name="4040"><span class="lineNum">    4040 </span>                :            :     __sp_mut&amp; __m = __get_sp_mut(__p);</a>
<a name="4041"><span class="lineNum">    4041 </span>                :            :     __m.lock();</a>
<a name="4042"><span class="lineNum">    4042 </span>                :            :     __p-&gt;swap(__r);</a>
<a name="4043"><span class="lineNum">    4043 </span>                :            :     __m.unlock();</a>
<a name="4044"><span class="lineNum">    4044 </span>                :            : }</a>
<a name="4045"><span class="lineNum">    4045 </span>                :            : </a>
<a name="4046"><span class="lineNum">    4046 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4047"><span class="lineNum">    4047 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4048"><span class="lineNum">    4048 </span>                :            : _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4049"><span class="lineNum">    4049 </span>                :            : void</a>
<a name="4050"><span class="lineNum">    4050 </span>                :            : atomic_store_explicit(shared_ptr&lt;_Tp&gt;* __p, shared_ptr&lt;_Tp&gt; __r, memory_order)</a>
<a name="4051"><span class="lineNum">    4051 </span>                :            : {</a>
<a name="4052"><span class="lineNum">    4052 </span>                :            :     atomic_store(__p, __r);</a>
<a name="4053"><span class="lineNum">    4053 </span>                :            : }</a>
<a name="4054"><span class="lineNum">    4054 </span>                :            : </a>
<a name="4055"><span class="lineNum">    4055 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4056"><span class="lineNum">    4056 </span>                :            : _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4057"><span class="lineNum">    4057 </span>                :            : shared_ptr&lt;_Tp&gt;</a>
<a name="4058"><span class="lineNum">    4058 </span>                :            : atomic_exchange(shared_ptr&lt;_Tp&gt;* __p, shared_ptr&lt;_Tp&gt; __r)</a>
<a name="4059"><span class="lineNum">    4059 </span>                :            : {</a>
<a name="4060"><span class="lineNum">    4060 </span>                :            :     __sp_mut&amp; __m = __get_sp_mut(__p);</a>
<a name="4061"><span class="lineNum">    4061 </span>                :            :     __m.lock();</a>
<a name="4062"><span class="lineNum">    4062 </span>                :            :     __p-&gt;swap(__r);</a>
<a name="4063"><span class="lineNum">    4063 </span>                :            :     __m.unlock();</a>
<a name="4064"><span class="lineNum">    4064 </span>                :            :     return __r;</a>
<a name="4065"><span class="lineNum">    4065 </span>                :            : }</a>
<a name="4066"><span class="lineNum">    4066 </span>                :            : </a>
<a name="4067"><span class="lineNum">    4067 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4068"><span class="lineNum">    4068 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4069"><span class="lineNum">    4069 </span>                :            : _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4070"><span class="lineNum">    4070 </span>                :            : shared_ptr&lt;_Tp&gt;</a>
<a name="4071"><span class="lineNum">    4071 </span>                :            : atomic_exchange_explicit(shared_ptr&lt;_Tp&gt;* __p, shared_ptr&lt;_Tp&gt; __r, memory_order)</a>
<a name="4072"><span class="lineNum">    4072 </span>                :            : {</a>
<a name="4073"><span class="lineNum">    4073 </span>                :            :     return atomic_exchange(__p, __r);</a>
<a name="4074"><span class="lineNum">    4074 </span>                :            : }</a>
<a name="4075"><span class="lineNum">    4075 </span>                :            : </a>
<a name="4076"><span class="lineNum">    4076 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4077"><span class="lineNum">    4077 </span>                :            : _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4078"><span class="lineNum">    4078 </span>                :            : bool</a>
<a name="4079"><span class="lineNum">    4079 </span>                :            : atomic_compare_exchange_strong(shared_ptr&lt;_Tp&gt;* __p, shared_ptr&lt;_Tp&gt;* __v, shared_ptr&lt;_Tp&gt; __w)</a>
<a name="4080"><span class="lineNum">    4080 </span>                :            : {</a>
<a name="4081"><span class="lineNum">    4081 </span>                :            :     shared_ptr&lt;_Tp&gt; __temp;</a>
<a name="4082"><span class="lineNum">    4082 </span>                :            :     __sp_mut&amp; __m = __get_sp_mut(__p);</a>
<a name="4083"><span class="lineNum">    4083 </span>                :            :     __m.lock();</a>
<a name="4084"><span class="lineNum">    4084 </span>                :            :     if (__p-&gt;__owner_equivalent(*__v))</a>
<a name="4085"><span class="lineNum">    4085 </span>                :            :     {</a>
<a name="4086"><span class="lineNum">    4086 </span>                :            :         _VSTD::swap(__temp, *__p);</a>
<a name="4087"><span class="lineNum">    4087 </span>                :            :         *__p = __w;</a>
<a name="4088"><span class="lineNum">    4088 </span>                :            :         __m.unlock();</a>
<a name="4089"><span class="lineNum">    4089 </span>                :            :         return true;</a>
<a name="4090"><span class="lineNum">    4090 </span>                :            :     }</a>
<a name="4091"><span class="lineNum">    4091 </span>                :            :     _VSTD::swap(__temp, *__v);</a>
<a name="4092"><span class="lineNum">    4092 </span>                :            :     *__v = *__p;</a>
<a name="4093"><span class="lineNum">    4093 </span>                :            :     __m.unlock();</a>
<a name="4094"><span class="lineNum">    4094 </span>                :            :     return false;</a>
<a name="4095"><span class="lineNum">    4095 </span>                :            : }</a>
<a name="4096"><span class="lineNum">    4096 </span>                :            : </a>
<a name="4097"><span class="lineNum">    4097 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4098"><span class="lineNum">    4098 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4099"><span class="lineNum">    4099 </span>                :            : _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4100"><span class="lineNum">    4100 </span>                :            : bool</a>
<a name="4101"><span class="lineNum">    4101 </span>                :            : atomic_compare_exchange_weak(shared_ptr&lt;_Tp&gt;* __p, shared_ptr&lt;_Tp&gt;* __v, shared_ptr&lt;_Tp&gt; __w)</a>
<a name="4102"><span class="lineNum">    4102 </span>                :            : {</a>
<a name="4103"><span class="lineNum">    4103 </span>                :            :     return atomic_compare_exchange_strong(__p, __v, __w);</a>
<a name="4104"><span class="lineNum">    4104 </span>                :            : }</a>
<a name="4105"><span class="lineNum">    4105 </span>                :            : </a>
<a name="4106"><span class="lineNum">    4106 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4107"><span class="lineNum">    4107 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4108"><span class="lineNum">    4108 </span>                :            : _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4109"><span class="lineNum">    4109 </span>                :            : bool</a>
<a name="4110"><span class="lineNum">    4110 </span>                :            : atomic_compare_exchange_strong_explicit(shared_ptr&lt;_Tp&gt;* __p, shared_ptr&lt;_Tp&gt;* __v,</a>
<a name="4111"><span class="lineNum">    4111 </span>                :            :                                         shared_ptr&lt;_Tp&gt; __w, memory_order, memory_order)</a>
<a name="4112"><span class="lineNum">    4112 </span>                :            : {</a>
<a name="4113"><span class="lineNum">    4113 </span>                :            :     return atomic_compare_exchange_strong(__p, __v, __w);</a>
<a name="4114"><span class="lineNum">    4114 </span>                :            : }</a>
<a name="4115"><span class="lineNum">    4115 </span>                :            : </a>
<a name="4116"><span class="lineNum">    4116 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4117"><span class="lineNum">    4117 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4118"><span class="lineNum">    4118 </span>                :            : _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR</a>
<a name="4119"><span class="lineNum">    4119 </span>                :            : bool</a>
<a name="4120"><span class="lineNum">    4120 </span>                :            : atomic_compare_exchange_weak_explicit(shared_ptr&lt;_Tp&gt;* __p, shared_ptr&lt;_Tp&gt;* __v,</a>
<a name="4121"><span class="lineNum">    4121 </span>                :            :                                       shared_ptr&lt;_Tp&gt; __w, memory_order, memory_order)</a>
<a name="4122"><span class="lineNum">    4122 </span>                :            : {</a>
<a name="4123"><span class="lineNum">    4123 </span>                :            :     return atomic_compare_exchange_weak(__p, __v, __w);</a>
<a name="4124"><span class="lineNum">    4124 </span>                :            : }</a>
<a name="4125"><span class="lineNum">    4125 </span>                :            : </a>
<a name="4126"><span class="lineNum">    4126 </span>                :            : #endif  // !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)</a>
<a name="4127"><span class="lineNum">    4127 </span>                :            : </a>
<a name="4128"><span class="lineNum">    4128 </span>                :            : //enum class</a>
<a name="4129"><span class="lineNum">    4129 </span>                :            : #if defined(_LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE)</a>
<a name="4130"><span class="lineNum">    4130 </span>                :            : # ifndef _LIBCPP_CXX03_LANG</a>
<a name="4131"><span class="lineNum">    4131 </span>                :            : enum class pointer_safety : unsigned char {</a>
<a name="4132"><span class="lineNum">    4132 </span>                :            :   relaxed,</a>
<a name="4133"><span class="lineNum">    4133 </span>                :            :   preferred,</a>
<a name="4134"><span class="lineNum">    4134 </span>                :            :   strict</a>
<a name="4135"><span class="lineNum">    4135 </span>                :            : };</a>
<a name="4136"><span class="lineNum">    4136 </span>                :            : # endif</a>
<a name="4137"><span class="lineNum">    4137 </span>                :            : #else</a>
<a name="4138"><span class="lineNum">    4138 </span>                :            : struct _LIBCPP_TYPE_VIS pointer_safety</a>
<a name="4139"><span class="lineNum">    4139 </span>                :            : {</a>
<a name="4140"><span class="lineNum">    4140 </span>                :            :     enum __lx</a>
<a name="4141"><span class="lineNum">    4141 </span>                :            :     {</a>
<a name="4142"><span class="lineNum">    4142 </span>                :            :         relaxed,</a>
<a name="4143"><span class="lineNum">    4143 </span>                :            :         preferred,</a>
<a name="4144"><span class="lineNum">    4144 </span>                :            :         strict</a>
<a name="4145"><span class="lineNum">    4145 </span>                :            :     };</a>
<a name="4146"><span class="lineNum">    4146 </span>                :            : </a>
<a name="4147"><span class="lineNum">    4147 </span>                :            :     __lx __v_;</a>
<a name="4148"><span class="lineNum">    4148 </span>                :            : </a>
<a name="4149"><span class="lineNum">    4149 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="4150"><span class="lineNum">    4150 </span>                :            :     pointer_safety() : __v_() {}</a>
<a name="4151"><span class="lineNum">    4151 </span>                :            : </a>
<a name="4152"><span class="lineNum">    4152 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="4153"><span class="lineNum">    4153 </span>                :            :     pointer_safety(__lx __v) : __v_(__v) {}</a>
<a name="4154"><span class="lineNum">    4154 </span>                :            :     _LIBCPP_INLINE_VISIBILITY</a>
<a name="4155"><span class="lineNum">    4155 </span>                :            :     operator int() const {return __v_;}</a>
<a name="4156"><span class="lineNum">    4156 </span>                :            : };</a>
<a name="4157"><span class="lineNum">    4157 </span>                :            : #endif</a>
<a name="4158"><span class="lineNum">    4158 </span>                :            : </a>
<a name="4159"><span class="lineNum">    4159 </span>                :            : #if !defined(_LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE) &amp;&amp; \</a>
<a name="4160"><span class="lineNum">    4160 </span>                :            :     defined(_LIBCPP_BUILDING_LIBRARY)</a>
<a name="4161"><span class="lineNum">    4161 </span>                :            : _LIBCPP_FUNC_VIS pointer_safety get_pointer_safety() _NOEXCEPT;</a>
<a name="4162"><span class="lineNum">    4162 </span>                :            : #else</a>
<a name="4163"><span class="lineNum">    4163 </span>                :            : // This function is only offered in C++03 under ABI v1.</a>
<a name="4164"><span class="lineNum">    4164 </span>                :            : # if !defined(_LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE) || !defined(_LIBCPP_CXX03_LANG)</a>
<a name="4165"><span class="lineNum">    4165 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4166"><span class="lineNum">    4166 </span>                :            : pointer_safety get_pointer_safety() _NOEXCEPT {</a>
<a name="4167"><span class="lineNum">    4167 </span>                :            :   return pointer_safety::relaxed;</a>
<a name="4168"><span class="lineNum">    4168 </span>                :            : }</a>
<a name="4169"><span class="lineNum">    4169 </span>                :            : # endif</a>
<a name="4170"><span class="lineNum">    4170 </span>                :            : #endif</a>
<a name="4171"><span class="lineNum">    4171 </span>                :            : </a>
<a name="4172"><span class="lineNum">    4172 </span>                :            : </a>
<a name="4173"><span class="lineNum">    4173 </span>                :            : _LIBCPP_FUNC_VIS void declare_reachable(void* __p);</a>
<a name="4174"><span class="lineNum">    4174 </span>                :            : _LIBCPP_FUNC_VIS void declare_no_pointers(char* __p, size_t __n);</a>
<a name="4175"><span class="lineNum">    4175 </span>                :            : _LIBCPP_FUNC_VIS void undeclare_no_pointers(char* __p, size_t __n);</a>
<a name="4176"><span class="lineNum">    4176 </span>                :            : _LIBCPP_FUNC_VIS void* __undeclare_reachable(void* __p);</a>
<a name="4177"><span class="lineNum">    4177 </span>                :            : </a>
<a name="4178"><span class="lineNum">    4178 </span>                :            : template &lt;class _Tp&gt;</a>
<a name="4179"><span class="lineNum">    4179 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4180"><span class="lineNum">    4180 </span>                :            : _Tp*</a>
<a name="4181"><span class="lineNum">    4181 </span>                :            : undeclare_reachable(_Tp* __p)</a>
<a name="4182"><span class="lineNum">    4182 </span>                :            : {</a>
<a name="4183"><span class="lineNum">    4183 </span>                :            :     return static_cast&lt;_Tp*&gt;(__undeclare_reachable(__p));</a>
<a name="4184"><span class="lineNum">    4184 </span>                :            : }</a>
<a name="4185"><span class="lineNum">    4185 </span>                :            : </a>
<a name="4186"><span class="lineNum">    4186 </span>                :            : _LIBCPP_FUNC_VIS void* align(size_t __align, size_t __sz, void*&amp; __ptr, size_t&amp; __space);</a>
<a name="4187"><span class="lineNum">    4187 </span>                :            : </a>
<a name="4188"><span class="lineNum">    4188 </span>                :            : // --- Helper for container swap --</a>
<a name="4189"><span class="lineNum">    4189 </span>                :            : template &lt;typename _Alloc&gt;</a>
<a name="4190"><span class="lineNum">    4190 </span>                :            : _LIBCPP_INLINE_VISIBILITY</a>
<a name="4191"><span class="lineNum">    4191 </span>                :            : void __swap_allocator(_Alloc &amp; __a1, _Alloc &amp; __a2, true_type)</a>
<a name="4192"><span class="lineNum">    4192 </span>                :            : #if _LIBCPP_STD_VER &gt;= 14</a>
<a name="4193"><span class="lineNum">    4193 </span>                :            :     _NOEXCEPT</a>
<a name="4194"><span class="lineNum">    4194 </span>                :            : #else</a>
<a name="4195"><span class="lineNum">    4195 </span>                :            :     _NOEXCEPT_(__is_nothrow_swappable&lt;_Alloc&gt;::value)</a>
<a name="4196"><span class="lineNum">    4196 </span>                :            : #endif</a>
<a name="4197"><span class="lineNum">    4197 </span>                :            : {</a>
<a name="4198"><span class="lineNum">    4198 </span>                :            :     using _VSTD::swap;</a>
<a name="4199"><span class="lineNum">    4199 </span>                :            :     swap(__a1, __a2);</a>
<a name="4200"><span class="lineNum">    4200 </span>                :            : }</a>
<a name="4201"><span class="lineNum">    4201 </span>                :            : </a>
<a name="4202"><span class="lineNum">    4202 </span>                :            : template &lt;typename _Alloc&gt;</a>
<a name="4203"><span class="lineNum">    4203 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4204"><span class="lineNum">    4204 </span>                :            : void __swap_allocator(_Alloc &amp;, _Alloc &amp;, false_type) _NOEXCEPT {}</a>
<a name="4205"><span class="lineNum">    4205 </span>                :            : </a>
<a name="4206"><span class="lineNum">    4206 </span>                :            : template &lt;typename _Alloc&gt;</a>
<a name="4207"><span class="lineNum">    4207 </span>                :            : inline _LIBCPP_INLINE_VISIBILITY</a>
<a name="4208"><span class="lineNum">    4208 </span>                :            : void __swap_allocator(_Alloc &amp; __a1, _Alloc &amp; __a2)</a>
<a name="4209"><span class="lineNum">    4209 </span>                :            : #if _LIBCPP_STD_VER &gt;= 14</a>
<a name="4210"><span class="lineNum">    4210 </span>                :            :     _NOEXCEPT</a>
<a name="4211"><span class="lineNum">    4211 </span>                :            : #else</a>
<a name="4212"><span class="lineNum">    4212 </span>                :            :     _NOEXCEPT_(__is_nothrow_swappable&lt;_Alloc&gt;::value)</a>
<a name="4213"><span class="lineNum">    4213 </span>                :            : #endif</a>
<a name="4214"><span class="lineNum">    4214 </span>                :            : {</a>
<a name="4215"><span class="lineNum">    4215 </span>                :            :     _VSTD::__swap_allocator(__a1, __a2,</a>
<a name="4216"><span class="lineNum">    4216 </span>                :            :       integral_constant&lt;bool, _VSTD::allocator_traits&lt;_Alloc&gt;::propagate_on_container_swap::value&gt;());</a>
<a name="4217"><span class="lineNum">    4217 </span>                :            : }</a>
<a name="4218"><span class="lineNum">    4218 </span>                :            : </a>
<a name="4219"><span class="lineNum">    4219 </span>                :            : template &lt;typename _Alloc, typename _Traits=allocator_traits&lt;_Alloc&gt; &gt;</a>
<a name="4220"><span class="lineNum">    4220 </span>                :            : struct __noexcept_move_assign_container : public integral_constant&lt;bool,</a>
<a name="4221"><span class="lineNum">    4221 </span>                :            :     _Traits::propagate_on_container_move_assignment::value</a>
<a name="4222"><span class="lineNum">    4222 </span>                :            : #if _LIBCPP_STD_VER &gt; 14</a>
<a name="4223"><span class="lineNum">    4223 </span>                :            :         || _Traits::is_always_equal::value</a>
<a name="4224"><span class="lineNum">    4224 </span>                :            : #else</a>
<a name="4225"><span class="lineNum">    4225 </span>                :            :         &amp;&amp; is_nothrow_move_assignable&lt;_Alloc&gt;::value</a>
<a name="4226"><span class="lineNum">    4226 </span>                :            : #endif</a>
<a name="4227"><span class="lineNum">    4227 </span>                :            :     &gt; {};</a>
<a name="4228"><span class="lineNum">    4228 </span>                :            : </a>
<a name="4229"><span class="lineNum">    4229 </span>                :            : </a>
<a name="4230"><span class="lineNum">    4230 </span>                :            : template &lt;class _Tp, class _Alloc&gt;</a>
<a name="4231"><span class="lineNum">    4231 </span>                :            : struct __temp_value {</a>
<a name="4232"><span class="lineNum">    4232 </span>                :            :     typedef allocator_traits&lt;_Alloc&gt; _Traits;</a>
<a name="4233"><span class="lineNum">    4233 </span>                :            : </a>
<a name="4234"><span class="lineNum">    4234 </span>                :            :     typename aligned_storage&lt;sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)&gt;::type __v;</a>
<a name="4235"><span class="lineNum">    4235 </span>                :            :     _Alloc &amp;__a;</a>
<a name="4236"><span class="lineNum">    4236 </span>                :            : </a>
<a name="4237"><span class="lineNum">    4237 </span>                :            :     _Tp *__addr() { return reinterpret_cast&lt;_Tp *&gt;(addressof(__v)); }</a>
<a name="4238"><span class="lineNum">    4238 </span>                :            :     _Tp &amp;   get() { return *__addr(); }</a>
<a name="4239"><span class="lineNum">    4239 </span>                :            : </a>
<a name="4240"><span class="lineNum">    4240 </span>                :            :     template&lt;class... _Args&gt;</a>
<a name="4241"><span class="lineNum">    4241 </span>                :            :     _LIBCPP_NO_CFI</a>
<a name="4242"><span class="lineNum">    4242 </span>                :            :     __temp_value(_Alloc &amp;__alloc, _Args&amp;&amp; ... __args) : __a(__alloc) {</a>
<a name="4243"><span class="lineNum">    4243 </span>                :            :       _Traits::construct(__a, reinterpret_cast&lt;_Tp*&gt;(addressof(__v)),</a>
<a name="4244"><span class="lineNum">    4244 </span>                :            :                          _VSTD::forward&lt;_Args&gt;(__args)...);</a>
<a name="4245"><span class="lineNum">    4245 </span>                :            :     }</a>
<a name="4246"><span class="lineNum">    4246 </span>                :            : </a>
<a name="4247"><span class="lineNum">    4247 </span>                :            :     ~__temp_value() { _Traits::destroy(__a, __addr()); }</a>
<a name="4248"><span class="lineNum">    4248 </span>                :            :     };</a>
<a name="4249"><span class="lineNum">    4249 </span>                :            : </a>
<a name="4250"><span class="lineNum">    4250 </span>                :            : template&lt;typename _Alloc, typename = void, typename = void&gt;</a>
<a name="4251"><span class="lineNum">    4251 </span>                :            : struct __is_allocator : false_type {};</a>
<a name="4252"><span class="lineNum">    4252 </span>                :            : </a>
<a name="4253"><span class="lineNum">    4253 </span>                :            : template&lt;typename _Alloc&gt;</a>
<a name="4254"><span class="lineNum">    4254 </span>                :            : struct __is_allocator&lt;_Alloc,</a>
<a name="4255"><span class="lineNum">    4255 </span>                :            :        typename __void_t&lt;typename _Alloc::value_type&gt;::type,</a>
<a name="4256"><span class="lineNum">    4256 </span>                :            :        typename __void_t&lt;decltype(_VSTD::declval&lt;_Alloc&amp;&gt;().allocate(size_t(0)))&gt;::type</a>
<a name="4257"><span class="lineNum">    4257 </span>                :            :      &gt;</a>
<a name="4258"><span class="lineNum">    4258 </span>                :            :    : true_type {};</a>
<a name="4259"><span class="lineNum">    4259 </span>                :            : </a>
<a name="4260"><span class="lineNum">    4260 </span>                :            : // __builtin_new_allocator -- A non-templated helper for allocating and</a>
<a name="4261"><span class="lineNum">    4261 </span>                :            : // deallocating memory using __builtin_operator_new and</a>
<a name="4262"><span class="lineNum">    4262 </span>                :            : // __builtin_operator_delete. It should be used in preference to</a>
<a name="4263"><span class="lineNum">    4263 </span>                :            : // `std::allocator&lt;T&gt;` to avoid additional instantiations.</a>
<a name="4264"><span class="lineNum">    4264 </span>                :            : struct __builtin_new_allocator {</a>
<a name="4265"><span class="lineNum">    4265 </span>                :            :   struct __builtin_new_deleter {</a>
<a name="4266"><span class="lineNum">    4266 </span>                :            :     typedef void* pointer_type;</a>
<a name="4267"><span class="lineNum">    4267 </span>                :            : </a>
<a name="4268"><span class="lineNum">    4268 </span>                :            :     _LIBCPP_CONSTEXPR explicit __builtin_new_deleter(size_t __size, size_t __align)</a>
<a name="4269"><span class="lineNum">    4269 </span>                :            :         : __size_(__size), __align_(__align) {}</a>
<a name="4270"><span class="lineNum">    4270 </span>                :            : </a>
<a name="4271"><span class="lineNum">    4271 </span>                :            :     void operator()(void* p) const _NOEXCEPT {</a>
<a name="4272"><span class="lineNum">    4272 </span>                :            :         _VSTD::__libcpp_deallocate(p, __size_, __align_);</a>
<a name="4273"><span class="lineNum">    4273 </span>                :            :     }</a>
<a name="4274"><span class="lineNum">    4274 </span>                :            : </a>
<a name="4275"><span class="lineNum">    4275 </span>                :            :    private:</a>
<a name="4276"><span class="lineNum">    4276 </span>                :            :     size_t __size_;</a>
<a name="4277"><span class="lineNum">    4277 </span>                :            :     size_t __align_;</a>
<a name="4278"><span class="lineNum">    4278 </span>                :            :   };</a>
<a name="4279"><span class="lineNum">    4279 </span>                :            : </a>
<a name="4280"><span class="lineNum">    4280 </span>                :            :   typedef unique_ptr&lt;void, __builtin_new_deleter&gt; __holder_t;</a>
<a name="4281"><span class="lineNum">    4281 </span>                :            : </a>
<a name="4282"><span class="lineNum">    4282 </span>                :            :   static __holder_t __allocate_bytes(size_t __s, size_t __align) {</a>
<a name="4283"><span class="lineNum">    4283 </span>                :            :       return __holder_t(_VSTD::__libcpp_allocate(__s, __align),</a>
<a name="4284"><span class="lineNum">    4284 </span>                :            :                      __builtin_new_deleter(__s, __align));</a>
<a name="4285"><span class="lineNum">    4285 </span>                :            :   }</a>
<a name="4286"><span class="lineNum">    4286 </span>                :            : </a>
<a name="4287"><span class="lineNum">    4287 </span>                :            :   static void __deallocate_bytes(void* __p, size_t __s,</a>
<a name="4288"><span class="lineNum">    4288 </span>                :            :                                  size_t __align) _NOEXCEPT {</a>
<a name="4289"><span class="lineNum">    4289 </span>                :            :       _VSTD::__libcpp_deallocate(__p, __s, __align);</a>
<a name="4290"><span class="lineNum">    4290 </span>                :            :   }</a>
<a name="4291"><span class="lineNum">    4291 </span>                :            : </a>
<a name="4292"><span class="lineNum">    4292 </span>                :            :   template &lt;class _Tp&gt;</a>
<a name="4293"><span class="lineNum">    4293 </span>                :            :   _LIBCPP_NODEBUG _LIBCPP_ALWAYS_INLINE</a>
<a name="4294"><span class="lineNum">    4294 </span>                :            :   static __holder_t __allocate_type(size_t __n) {</a>
<a name="4295"><span class="lineNum">    4295 </span>                :            :       return __allocate_bytes(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));</a>
<a name="4296"><span class="lineNum">    4296 </span>                :            :   }</a>
<a name="4297"><span class="lineNum">    4297 </span>                :            : </a>
<a name="4298"><span class="lineNum">    4298 </span>                :            :   template &lt;class _Tp&gt;</a>
<a name="4299"><span class="lineNum">    4299 </span>                :            :   _LIBCPP_NODEBUG _LIBCPP_ALWAYS_INLINE</a>
<a name="4300"><span class="lineNum">    4300 </span>                :            :   static void __deallocate_type(void* __p, size_t __n) _NOEXCEPT {</a>
<a name="4301"><span class="lineNum">    4301 </span>                :            :       __deallocate_bytes(__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));</a>
<a name="4302"><span class="lineNum">    4302 </span>                :            :   }</a>
<a name="4303"><span class="lineNum">    4303 </span>                :            : };</a>
<a name="4304"><span class="lineNum">    4304 </span>                :            : </a>
<a name="4305"><span class="lineNum">    4305 </span>                :            : </a>
<a name="4306"><span class="lineNum">    4306 </span>                :            : _LIBCPP_END_NAMESPACE_STD</a>
<a name="4307"><span class="lineNum">    4307 </span>                :            : </a>
<a name="4308"><span class="lineNum">    4308 </span>                :            : _LIBCPP_POP_MACROS</a>
<a name="4309"><span class="lineNum">    4309 </span>                :            : </a>
<a name="4310"><span class="lineNum">    4310 </span>                :            : #if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) &amp;&amp; _LIBCPP_STD_VER &gt;= 17</a>
<a name="4311"><span class="lineNum">    4311 </span>                :            : #   include &lt;__pstl_memory&gt;</a>
<a name="4312"><span class="lineNum">    4312 </span>                :            : #endif</a>
<a name="4313"><span class="lineNum">    4313 </span>                :            : </a>
<a name="4314"><span class="lineNum">    4314 </span>                :            : #endif  // _LIBCPP_MEMORY</a>
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
  </table>
  <br>

</body>
</html>
